Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tab Manager Third Party Compat
function third_party_tab( $tabs ) {
global $product;
$some_check = $product ? third_party_check( $product->id ) : null;
if ( $product && ! $some_check ) {
return $tabs;
}
$tabs['third_party_tab'] = array(
'title' => __( 'Third Party Tab Tab', 'wc_third_party' ),
'priority' => 20,
'callback' => 'third_party_tab_content'
);
return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'third_party_tab' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.