Last active
May 20, 2021 23:28
-
-
Save racmanuel/5ff6d5ef77384aa2cb6e8f1ad3b37a38 to your computer and use it in GitHub Desktop.
Add a custom tab into the Products Data metabox in Woocommerce - Products
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** This filter function will add a custom tab to the Products Data metabox */ | |
function add_my_custom_product_data_tab($product_data_tabs) | |
{ | |
$product_data_tabs['marketplace'] = array( | |
'label' => __('Name of you custom tab', 'my_custom_text_domain'), | |
'target' => 'my_custom_product_data', | |
); | |
return $product_data_tabs; | |
} | |
add_filter('woocommerce_product_data_tabs', 'add_my_custom_product_data_tab', 99, 1); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment