Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce - Neues Produkt-Tab hinzufügen
/*
* 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