Last active
June 30, 2017 09:00
Star
You must be signed in to star a gist
WooCommerce - Neues Produkt-Tab hinzufügen
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
/* | |
* WooCommerce - Neues Produkt-Tab hinzufügen | |
* https://wooexperte.de/snippet/neues-produkt-tab-hinzufuegen/ | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' ); | |
function woo_new_product_tab( $tabs ) { | |
// Inhalt Produkt-Tab | |
$tabs['test_tab'] = array( | |
'title' => __( 'Neues Produkt Tab', 'woocommerce' ), // Beschriftung Tab | |
'priority' => 50, | |
'callback' => 'woo_new_product_tab_content' | |
); | |
return $tabs; | |
} | |
function woo_new_product_tab_content() { | |
// Inhalt Produkt Tab | |
echo '<h2>Überschrift Produkt-Tab</h2>'; // Überschrift Tab | |
echo '<p>Text Produkt-Tab</p>'; // Text Tab | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment