Skip to content

Instantly share code, notes, and snippets.

@bekarice
Last active November 17, 2018 22:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bekarice/4098dcfbcabc54cb790d to your computer and use it in GitHub Desktop.
Save bekarice/4098dcfbcabc54cb790d to your computer and use it in GitHub Desktop.
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