cart->get_cart(); if( count($items) == 0 || empty($items) ) { ?> sale'; } // Change add to cart text on product archives(Collection) page // First unhook the WooCommerce content wrappers. remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); // Then hook in your own functions to display the wrappers your theme requires. add_action( 'woocommerce_before_main_content', 'anzu_woocommerce_wrapper_start', 10 ); add_action( 'woocommerce_after_main_content', 'anzu_woocommerce_wrapper_end', 10 ); if ( ! function_exists( 'anzu_woocommerce_wrapper_start' ) ) { /** * Display the theme specific start of the page wrapper. */ function anzu_woocommerce_wrapper_start() { $container = get_theme_mod( 'anzu_container', 'container' ); echo '