Search code examples
phpwordpresswoocommerceproducthook-woocommerce

Moving Product Meta to Additional Information Tab


I need to move the Product Meta content from under the "Add to Cart" button to the "Additional Information" Tab, I want it to display similar to the attribute as the client wants to move this information to Additional Information Tab.

For eg - http://yellowbee.online/product/yellow-bee-aqua-bug-led-clogs/

I need to move the "SKU", "Categories" and "Tags" to the tab which says "Additional Information"

Website is made using xStore Theme on Wordpress & Woocommerce, I have tried reading a lot on how to achieve this but all attempts have failed.

I have tried adding the following code to the functions.php in the child theme. No Luck.

function additional_product_tabs_metabox()
{
    add_meta_box(
        'add_product_metabox_additional_tabs',
        __( 'Additional product Tabs', 'woocommerce' ),
        'additional_product_tabs_metabox_content',
        'product',
        'normal',
        'high'
    );
}

I am hoping that someone has a solution on the right code to to get this hook and then to display it in the additional information tab.


Solution

  • This can be done with the following:

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
    add_action( 'woocommerce_product_additional_information', 'woocommerce_template_single_meta', 10 );
    

    Code goes in functions.php file of your active child theme (or active theme). Tested and works.

    enter image description here

    This will work if the related hooks are not yet customized by the theme or a plugin.