Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wooexperte/be422cc2b81d0b10ba6e539e0a1774a3 to your computer and use it in GitHub Desktop.
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