Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
Created June 22, 2020 06:34
Show Gist options
  • Select an option

  • Save farookibrahim/f6762c5f5a931ef6e5997337e1428ace to your computer and use it in GitHub Desktop.

Select an option

Save farookibrahim/f6762c5f5a931ef6e5997337e1428ace to your computer and use it in GitHub Desktop.
Cartzilla - Remove sidebar information from single product page
if ( ! function_exists( 'cartzilla_remove_single_product_v3_sidebar_details' ) ) {
    function cartzilla_remove_single_product_v3_sidebar_details() {
        if ( 'style-v3' === cartzilla_get_single_product_style() ) {
            remove_action( 'woocommerce_single_product_summary', 'cartzilla_product_sold_count', 60 );
            remove_action( 'woocommerce_single_product_summary', 'cartzilla_single_product_star_rating', 70 );
            remove_action( 'woocommerce_single_product_summary', 'cartzilla_wc_single_product_list', 80 );
        }
    }
}
add_action( 'woocommerce_before_single_product_summary', 'cartzilla_remove_single_product_v3_sidebar_details', 8 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment