• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Add rows to Single product Additional information table in WooCommerce 3.6

phpwordpresswoocommerceproducthook-woocommerce


PHP Snippet 1:

add_filter( 'woocommerce_display_product_attributes', 'custom_product_additional_information', 10, 2 );
function custom_product_additional_information( $product_attributes, $product ) {
    // First row
    $product_attributes[ 'attribute_' . 'custom-one' ] = array(
        'label' => __('Label One'),
        'value' => __('Value 1'),
    );

    // Second row
    $product_attributes[ 'attribute_' . 'custom-two' ] = array(
        'label' => __('Label Two'),
        'value' => __('Value 2'),
    );

    return $product_attributes;
}

Related Snippets

How to Install Composer Require doctrine/dbal

How to add automatically collapse/expand in content wordpress (single.php)?

WAMP/Wordpress - cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received

Call to a member function givePermissionTo() on null

Adding hreflang tags automatically in WordPress subdirectory multisite

Adding one microsecond to Datetime object in PHP

Multiple order by in WooCommerce

carbon generated datetime not stored correctly into the database

WooCommerce Additional Information - if empty, hide

Implode array with array of glue strings

How to skip cart page on woocomerce for certain products only?

Update Total in checkout of Woocommerce with Ajax Request

Yii Ajax Submit button

Warning file_get_contents () failed to open stream: HTTP request failed! HTTP/1.0 402 Payment Required

Remove country code from phone number?

About Contact Privacy policy Terms and conditions