Questions tagged [shipping-method]

This tag is used in e-commerce essentially. A "shipping method" define basic shipping behaviors and allow some specific settings related to naming, conditional rates (pricing), and other additional settings.

Shipping Methods are used in e-commerce.

A "shipping method" has a basic specific shipping behavior and allow some specific settings related to naming, conditional rates and other additional settings.

Then each "shipping method" has specific shipping rules and shipping pricing defined for each Shipping Zone.

Additionally some Shipping methods handle Shipping classes that can be linked specifically to some products.

329 questions
4
votes
1 answer

Set "free shipping" method as selected default shipping option in WooCommerce

I'm struggling with changing the shipping option selected default. The 'Free shipping' shipping option only shows up if the customer has the amount over $70 + in the cart. If the amount on the cart is less than $70 the shipping option will not show…
user6684898
4
votes
1 answer

WooCommerce shipping cost calculation in custom shipping method plugin

I am trying to create a plugin for WooCommerce that calculates the shipping costs depending on the product weight. I keep on getting this error: Warning: Declaration of WC_Your_Shipping_Method::calculate_shipping($package) should be compatible with…
4
votes
1 answer

Change wc_cart_totals_shipping_method_label function in Woocommerce

Inside Woocommerce plugin on the includes subfolder, there's a file wc-cart-functions.php. I would like to change the function wc_cart_totals_shipping_method_label(), but I am not allowed to copy the function to my theme's functions.php. I believe…
Danish Muneer
  • 568
  • 1
  • 9
  • 22
4
votes
2 answers

Progressive quantity based shipping costs with a max cost in Woocommerce

(How) can I set a max_fee for flat fee shipping costs in WooCommerce? Adding this to the costs field in the flat fee settings of a shipping method works: (1 * [qty]) + [fee min_fee = "2,5"] (i.e. shipping costs 2,5 per order + 1 Euro per product)…
Wouter
  • 1,296
  • 2
  • 14
  • 32
4
votes
1 answer

Hide shipping methods based on products categories in Woocommerce

With Woocommerce, I would like to hide all shipping methods except "Local pickup" when a defined products category is in cart… The code below does that for other product types, except variable products: add_filter( 'woocommerce_package_rates',…
Pityer
  • 113
  • 1
  • 14
3
votes
1 answer

WooCommerce: Hide Local Pickup shipping option if order total is zero

I would like to hide the "Local Pickup" option in WooCommerce shipping options if the order total is zero. These are what my current options look like: Have found a pro plugin, but it goes over and beyond what I need. I would prefer a simple code…
3
votes
3 answers

Hide shipping address in WooCommerce new order email notification depending on shipping method id

I want to hide the shipping address if the shipping label is called "Pick up at Rockefeller Store" (but to show for other pickup methods). There are too many ids such as "local_pickup:3" for me to filter through. I enabled the shipping address to be…
3
votes
2 answers

Disable only specific flat rate shipping method when free shipping is available in WooCommerce

I have two flat rates on my WooCommerce site and I want to disable one of them, when free shipping is enabled. I have a function which is working for all flat rates only. How do I check for an instance id on a shipping rate? Can anyone help me…
3
votes
1 answer

Add a body class for specific chosen shipping method in WooCommerce checkout

Based on Add a body class for specific selected shipping option in Woocommerce checkout answer code, I have been using the following code snippet for some time: add_filter( 'wp_footer','weekend_selected' ); function weekend_selected(){ if( !…
Rob
  • 57
  • 7
3
votes
1 answer

Custom WooCommerce shipping Method and distance rate value issue

I'm trying to calculate shipping rate based on distance by KM on Woocommerce by sending the total distance to an external API, so, for this purpose I have this function inside my own shipping plugin: public function calculate_shipping( $packages =…
Fabricio
  • 306
  • 1
  • 2
  • 12
3
votes
1 answer

Enable free shipping for products on sale in WooCommerce

In WooCommerce, is it possible to automatically apply free shipping to any product that is on sale? Every month we have different products on sale, and all sale products automatically qualify for free shipping. For sale products I currently have to…
Kevin
  • 157
  • 1
  • 1
  • 9
3
votes
2 answers

Show or hide shipping methods based on user meta data in WooCommerce

I have a code to hide shipping for non-wholesale customers, please help me redo it, I need to hide the shipping option for wholesale customers. /** * Removes shipping methods for non-wholesale customers. * Please be sure to clear your WooCommerce…
3
votes
1 answer

Hide specific shipping method when another specific shipping method is active in WooCommerce

There are lots of ways to hide shipping method when free shipping is active. My problem is that I am always offer free shipping on every order on the site. And at the same time i also offers a "faster" delivery that Requiring additional payment.…
3
votes
1 answer

Change Shipping method label name depending on its cost in WooCommerce

Prefacing this question, I know that there might be other ways to accomplish the goal, but I'm trying to understand how Woocommerce works a bit better, so the situation is I have a plugin that can change the cost of shipping depending on the…
Vorcia
  • 33
  • 1
  • 4
3
votes
1 answer

Exclude user role from custom shipping discount in Woocommerce

Based on Set custom shipping rates programmatically in Woocommerce 3 answer code, I modified it in order to add a discount on shipping rates for each seller. add_filter( 'woocommerce_package_rates', 'custom_shipping_methods', 10, 2 ); function…
1
2
3
21 22