Skip to content

Instantly share code, notes, and snippets.

Avatar

WooCommerce.com Documentation woogist

View GitHub Profile
View functions.php
add_action( 'after_setup_theme', 'sensei_support' );
function sensei_support() {
add_theme_support( 'sensei' );
}
View gist:326a585e7286bb0f07d5
global $woothemes_sensei;
remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 );
remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 );
View gist:6065863
// Hide ALL shipping options when free shipping is available
add_filter( 'woocommerce_available_shipping_methods', 'hide_all_shipping_when_free_is_available' , 10, 1 );
/**
* Hide ALL Shipping option when free shipping is available
*
* @param array $available_methods
*/
function hide_all_shipping_when_free_is_available( $available_methods ) {