Last active
October 1, 2019 17:30
-
-
Save KaineLabs/a38bb44052b056bfb435d8cbf4feade9 to your computer and use it in GitHub Desktop.
Disable Youzer Woocommerce Cart & Checkout Tabs.
This file contains 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
<?php | |
/** | |
* Disable Profile Woocommerce Tabs. | |
*/ | |
function yzc_disable_profile_woocommerce_tab( $tabs ) { | |
// Add Here the list of pages you want to disable. | |
$pages = array( 'checkout', 'cart' ); | |
foreach ( $pages as $page ) { | |
if ( isset( $tabs[ $page ] ) ) { | |
unset( $tabs[ $page ] ); | |
} | |
} | |
return $tabs; | |
} | |
add_filter( 'yz_woocommerce_sub_tabs', 'yzc_disable_profile_woocommerce_tab' ); | |
add_filter( 'yz_supported_wc_pages', 'yzc_disable_profile_woocommerce_tab' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment