How to fetch shipping price per package from Woocommerce order?

I'm searching for a way to split shipping costs between vendors (using a Vendors plugin) in Woocommerce. One solution would be to use the possibility to split orders into packages /made possible...

How to get all woocommerce shipping packages in a custom template

I need to let customer edit their pending payment order. By default, woocommerce only allow change the payment method. So, I have created a custom template for this feature. The problem now I...

WC()->cart and functions.php

I get this error when adding this code to functions.php Fatal error: Call to a member function calculate_totals() on a non-object This is the code generating the...

Select woocommerce chosen shipping method price

I'm trying to select the chosen_shipping_method price in woocommerce using this code: $packages = WC()->shipping->get_packages(); foreach ($packages as $i => $package) { $chosen_method =...

Woocommerce Onepage checkout does not show shipping costs

I have a Woocommerce One Page Checkout website with currently one product. Everything is working so far but for some reason I don't see the shippingcosts displayed. The price calculcation is...

WooCommerce: Programmatically changing the default shipping method

WooCommerce cannot prioritise table rate shipping methods so I am trying to do it myself but am failing horribly. I have tried to add an action at the point I think it is set but it is not...

How to split a stand in packets per class and per unit in woocommerce

I have a problem in my e-commerce, need to share certain class of products in a new package in my cart, but if you buy more than one unit of that class each unit is separated into a separate...

How to debug WooCommerce shipping packages

My WooCommerce store is using the Packages Configuration plugin to split orders into various packages based on their WC shipping_class. How can I precisely debug the shipping calculations? For...

How to get a list of shipping methods without a (filled)shopping cart

Is it possible to get a list of available shipping-methods based on only a total amount and/or country code? I quess it is possible by building my own SQL query, but I was wondering if it is also...

woocommerce shipping method with 3.0 api

Hi there, I'm trying to build a very simple plugin for woocommerce to show some information about delivery without taxes. The diference for the other methods is the extra HTML field. I read a lot...

how to query woocommerce shipping method tax price?

how to query woocommerce shipping method tax price ? Porblem i don't tax + prive query! Price query: <?php if($method->cost > 0) : ?>+<span style="font-weight: normal"><?= $method->cost ?>...

Woocommerce shipping cost not added to order

I have created a custom shipping method that calculates the cost of shipping from an external shipping API. I have followed the instructions found here (Woocommerce docs) and here(Tutsplus). I...

debugging WC_Shipping_Method packages

I have created an extended class out of WC_Shipping_Method and needed to debug and printout $packages in calculate_shipping method. var_dump is not showing anything on screen. Is there anyway to...

Display Products Shipping Classes in WooCommerce order edit page

I'm using a function that allows me to calculate more than one freight in the cart based on the shipping class of each product. The function has no problem, it's perfect. But when I check the...

WooCommerce shipping method duplication

I just upgraded woocommerce from 2.3.10 to 3.2.6 I had legacy flat rate and free shipping methods before, and I created a new shipping zone and then added the shipping methods to this zone. Of...

Display shipping options conditionally in multiple packages

So I am using a plugin to create multiple packages for my products, as each class has different shipping options. e.g a belt is delivered by post and a washing machine is delivered by van I am...

Custom dynamic shipping rate cost calculation in Woocommerce

I've set up a custom shipping method, i need to calculate shipping cost every time users get to the cart page. It seems that woocommerce_package_rates action (where I calculate the custom shipping...

WooCommerce - Show Final Shipping Selection on Checkout

Maybe I've been staring at WooCommerce core files for too long, but I can't figure out how to show only the final shipping selection on the Checkout page. Here's some background: I'm trying to...

Woocommerce: Need to show shipping price and include it in the total

I've inherited a custom built Woocommerce site and am having to make some upgrades but are getting a little stuck. I can show the cart total before taxes: WC()->cart->get_cart_total(); I can...

Accessing Shipping Rate object data in Woocommerce 3

I want to get the possible shipping methods in Woocommerce. I can get to the Class WC_Shipping_Rate class but i don't know how to get 'deeper' and it's driving me crazy. Here's my code: $packages...

Applied coupons disable Free shipping conditionally in Woocommerce

I am trying to get it so that if a customer were to add a coupon code (Any of them) the Free Shipping option would go away and the flat rate fee would be implemented. - You would think this would...

Refresh cached shipping methods on checkout update ajax event in Woocommerce

i just implemented a custom shipping solution. It depends on the total price of items in the cart. For example: if total is < 20 -> display free shipping if total is >= 20 -> paid...

Different Minimum Order Amounts Based on Shipping Zone

I am trying to implement a different minimum order requirement based on the shipping zone in woocommerce and I can't seem to get this to work. The $49.99 minimum still seems to be in effect...

Prevent access to checkout without shipping method in WooCommerce

I am trying to remove the proceed to checkout button and restrict access to the checkout page until a customer fills out the 'Calculate shipping' option on the basket page. I created a local...

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...

Woocommerce checkout ajax load in popup

I want to design a popup with multi-step checkout. I already created a cart and login module from scratch and then loaded it in the popup, but I don't know how to properly design the next...

Split cart in shipping packages for different shipping classes in WooCommerce

I face a problem in woocommerce shipping class. To explain it better I describe it with an example: Product A has Air Shipping class Product B has Road Shipping class product C has Possible...