Created
May 13, 2021 04:49
-
-
Save wbcomdev/3b22d435cfeeec34a50600ef56d28318 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /** | |
| * Add a custom product data tab. | |
| */ | |
| function wb_woo_new_product_tab( $tabs ) { | |
| // Adds the new tab. | |
| $tabs['test_tab'] = array( | |
| 'title' => __( 'New Product Tab', 'woocommerce' ), | |
| 'priority' => 50, | |
| 'callback' => 'wb_woo_new_product_tab_content', | |
| ); | |
| return $tabs; | |
| } | |
| /** | |
| * Custom product data tab content. | |
| */ | |
| function wb_woo_new_product_tab_content() { | |
| // The new tab content. | |
| echo '<h2>New Product Tab</h2>'; | |
| echo '<p>Here\'s your new product tab.</p>'; | |
| } | |
| add_filter( 'woocommerce_product_tabs', 'wb_woo_new_product_tab' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment