Szállítási módok elrejtése a Kosár oldalon
add_filter( ‘woocommerce_cart_ready_to_calc_shipping’, function( $show_shipping ) { if ( is_cart() ) { return false; } return $show_shipping; }, 99 );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘woocommerce_cart_ready_to_calc_shipping’, function( $show_shipping ) { if ( is_cart() ) { return false; } return $show_shipping; }, 99 );Continue reading
function remove_image_zoom_support_webtalkhub() { remove_theme_support( ‘wc-product-gallery-zoom’ ); } add_action( ‘wp’, ‘remove_image_zoom_support_webtalkhub’, 100 );Continue reading
add_action( ‘woocommerce_product_meta_start’, ‘text_after_meta_start’ ); function text_after_meta_start(){ echo ‘ Beställ färgprovar Hemma hos dig inom 2 – 3 veckor Unik, stark och hållbar Tillverkas i vår egen verkstad i Malung-Sälen av lokalt virke Hög kvalitet till ett rättvist pris Personlig service…Continue reading
/** * Hide shipping rates when free shipping is available. * Updated to support WooCommerce 2.6 Shipping Zones. * * @param array $rates Array of rates found for the package. * @return array */ function my_hide_shipping_when_free_is_available( $rates ) { $free…Continue reading
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_excerpt’, 20 ); add_action( ‘woocommerce_before_single_product_summary’, ‘start_left_side’, 5 ); function start_left_side() { print ‘ ‘.PHP_EOL; } add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_template_single_excerpt’, 30 ); add_action( ‘woocommerce_before_single_product_summary’, ‘end_left_side’, 40 ); function end_left_side() { print ‘ ‘.PHP_EOL; print ‘ ‘.PHP_EOL; }Continue reading
/** * Adds a top bar to Storefront, before the header. */ function storefront_add_topbar() { ?> Måttbeställt Tillverkade i vårt eget snickeri (Malung-Sälen) Hög kvalitet till ett rättvist pris Snabb leverans (2-3 veckor) <?php } add_action( 'storefront_before_header', 'storefront_add_topbar' );Continue reading
function bake_my_wp_remove_storefront_sidebar() { if ( is_woocommerce() || is_checkout() ) { remove_action( ‘storefront_sidebar’, ‘storefront_get_sidebar’, 10 ); } } add_action( ‘get_header’, ‘bake_my_wp_remove_storefront_sidebar’ );Continue reading
add_filter( ‘storefront_woocommerce_args’, ‘bbloomer_resize_storefront_images’ ); function bbloomer_resize_storefront_images( $args ) { $args[‘single_image_width’] = 1500; $args[‘thumbnail_image_width’] = 600; $args[‘gallery_thumbnail_image_width’] = 1500; return $args; }Continue reading
add_action( ‘init’, ‘jk_remove_storefront_handheld_footer_bar’ ); function jk_remove_storefront_handheld_footer_bar() { remove_action( ‘storefront_footer’, ‘storefront_handheld_footer_bar’, 999 ); }Continue reading
function register_review_list() { register_rest_route(‘review/v1’, ‘reviewList’, [ ‘methods’ => WP_REST_SERVER::READABLE, ‘callback’ => ‘review_list_results’ ]); } function review_list_results($data) { $results = []; // basic error handling if (false === isset($data[‘term’]) ) { return [ ‘error’ => ‘No soup for you…’ ]; }…Continue reading