Woocommerce – Shipping tax class based on cart items not using the highest tax available

I have found the answer by override the shipping tax filter // 0% and 21% tax producdts added combined to the cart needs to have 21% shipping tax add_filter(‘woocommerce_shipping_packages’, ‘override_woocommerce_shipping_packages’); function override_woocommerce_shipping_packages($packages) { $shipment_needs_tax = false; foreach ($packages[0][‘contents’] as $cartitem) { if (!empty($cartitem[‘data’]->tax_class)) $shipment_needs_tax = true; } if ($shipment_needs_tax && empty($packages[0][‘rates’][‘flat_rate:3’]->get_taxes())) { $shipcost = $packages[0][‘rates’][‘flat_rate:3’]->get_cost(); … Read more

How to show only part of product name in category page – WordPress with woocomerce

I solved this problem with: function hide_product_title_part( $title, $id ) { if ( ( is_front_page() || is_shop() || is_product_tag() || is_product_category() ) && get_post_type( $id ) === ‘product’ ) { if (strstr($title, “:”)) { $new_title = explode(“:”, $title); return $new_title[1]; } else { return $title; } } else { return $title; } } add_filter( ‘the_title’, … Read more

ACF | WooCommerce | Theme Development | How to include a /template-part/ that makes use of ACF’s on a custom WooCommerce homepage?

You cannot include template files via URL, which is what get_template_directory_uri() returns. You need to use the server file path, which you get get with get_theme_file_path(): $heroslider = get_theme_file_path( ‘template-parts/hero-slider.php’ ); echo $heroslider; include_once( $heroslider ); However, if you’re including templates (rather than files with function/class definitions), you should use get_template_part() to get the correct … Read more

How keep woocommerce users separeted in multisite install and keep admins on network

I don’t know if is the best way to do this but aparently works well. I override the users table adding one with an blog_id field as key. Add an “wp_pre_insert_user_data” filter to set the blog_id field and change the user id to some like “blog_id000user_id” (100044 for example is from blog 1). Override the … Read more

Gravity Forms – Prevent Multiple Form Entries Same User ID with Same Field Value

https://gravitywiz.com/documentation/gravity-forms-limit-submissions/ Gravity Perks is a great addon to gravity forms that does a lot of cool things. This particular add on would solve this problem – plus they have great support. I found this on github – I gave it a try and it didn’t break my site: https://github.com/uamv/gravityforms-custom-entry-limit Not sure if that means per … Read more