Last active
November 17, 2018 22:11
-
-
Save bekarice/4098dcfbcabc54cb790d to your computer and use it in GitHub Desktop.
Tab Manager Third Party Compat
This file contains hidden or 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
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