Category : shipping

I’ve tried to multiply shipping cost depending on how many pallets are in order. I think filter is wrong or something. It just doesnt change shipping price. $calc = ceil($a+$b / 8); $a > is quantity of pallets, $b > is quantity of units what calculates how many pallets. My code (function.php): add_filter( ‘woocommerce_cart_shipping_total’, ‘woocommerce_cart_shipping_total_filter_callback’, ..

Read more

I want to enable or disable Shipping Methods, according to user role. I have tested various different codes and approaches, none of which have worked so far. The current code: (source: stacklink ) add_filter( ‘woocommerce_package_rates’, ‘hide_specific_shipping_method_based_on_user_role’, 30, 2 ); function hide_shipping_method_based_on_user_role( $rates, $package ) { $shipping_id = ‘shipmondo:3’; foreach( $rates as $rate_key => $rate ){ ..

Read more

I want dispaly order weekdays(thursday and friday) before 11:00am deliver sameday except holidays(Saturday", "Sunday", "Monday", "Tuesday", "Wednesday).This is my code working for only common task based on holidays(sutuday and sunday) $date = new DateTime(‘now’); $date->modify(‘next tue 18:00’); $cutOffTime = new DateTime(‘front of 11’); $holidays = clone $date; if ($date > $cutOffTime) { $holidays->modify(‘0 weekdays’); } ..

Read more

Requirement: I want to allow Vendors to set their own flat rate shipping rates with two options – Domestic shipping and International Shipping. Each Vendor will set his own rates since they are located all over the world. Query: I have an issue with woocommerce shipping zone region. I don’t want to select any specific ..

Read more