Support is monitored from Monday to Saturday in office hours from the GMT timezone. Our response time can be up to 2 business days.

Notice: We do not accept any customization. Please Read Envato Support Policy. But we still can help with little snippets if that's possible!

Okay
  Print

Disable redirect woocommerce pages URL to Youzify Shop Tab

You want to use the WooCommerce integration. But you just don't want to use the My Account, Checkout, and other WooCommerce Template overrides. How can I disable these?

Please do these steps

1. Please go to your FTP/Cpanel

2. Go to folder "wp-content/plugins" and create a new file there. Name it with "bp-custom.php" (if you already have that file, please just open it. No need to create a new one).

3. Please put this snippet on the file and save

<?php
add_filter( 'youzify_wc_enable_my_account_redirect', '__return_false' );
add_filter( 'youzify_woocommerce_enable_redirects', '__return_false' );
/**
 * 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( 'youzify_woocommerce_sub_tabs', 'yzc_disable_profile_woocommerce_tab' );
add_filter( 'youzify_supported_wc_pages', 'yzc_disable_profile_woocommerce_tab' );

If you already have "bp-custom.php" file with other snippet there, please do not copy the code

After put the snippet, please clear your browser cache and if you use any cache plugin, please clear it too. And then test again.