Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active October 1, 2019 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/a38bb44052b056bfb435d8cbf4feade9 to your computer and use it in GitHub Desktop.
Save KaineLabs/a38bb44052b056bfb435d8cbf4feade9 to your computer and use it in GitHub Desktop.
Disable Youzer Woocommerce Cart & Checkout Tabs.
<?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