Skip to content

Instantly share code, notes, and snippets.

@placidrod
Created December 18, 2016 17:14
Show Gist options
  • Save placidrod/6e9034fe377000f705a60f48516311a2 to your computer and use it in GitHub Desktop.
Save placidrod/6e9034fe377000f705a60f48516311a2 to your computer and use it in GitHub Desktop.
VK Functions
/* Customize Single Product Page
-------------------------------------------*/
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
// remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_output_product_data_tabs', 20 );
/* Change url of Back to Shop Button */
function wc_empty_cart_redirect_url() {
return 'http://localhost/wp/woo_01/';
}
add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );
/* Remove Sidebar from cart, checkout, single product pages */
/*
function so_25700650_remove_sidebar(){
if( is_product() ){
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
}
}
add_action('woocommerce_before_main_content', 'so_25700650_remove_sidebar' );
*/
remove_action('woocommerce_sidebar', 'woocommerce_get_sidebar',10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment