WooCommerce NZ Post Plugin and Postage Price

WooCommerce NZ post plugin parcel value

I have a client that uses the NZ Post WooCommerce extension to calculate the shipping costs for products. https://woocommerce.com/products/new-zealand-post/
It’s a great plugin. As long as you have entered the size and weight on each product, the plugin will use the New Zealand Post API to get the correct postage amount and charge the customer shipping.

However we did come up against a slight problem. The New Zealand Post API requires the value of the package. Packages that are worth less than $250 can be sent by parcel post but packages over $250 in value must be sent by courier. Courier packages cost much more to send.

This is for insurance reasons in case the package goes missing or is broken. Which is fine. But the NZ Post WooCommerce extension take the value of the product from the retail value. The replacement value for my client was not the same as the retail value. In fact, this would be true for most e-commerce store owners. They all put a makeup on products. So the retail value is not the same as the wholesale value.

For my client is was not acceptable to charge so much for shipping or to absorb some of the cost.

So I contact the makers of the plugin and requested a way to set the value of a product to zero. That way the NZ Post API would always return the cheapest possible postage rate. And if the customer wants the package sent by courier they can choose that in the checkout and pay for the more expensive, faster option.

The good people who sell the plugin updated it to add a filter and gave me the following code to set the value to zero.

//Sets the value of a package to zero so NZ post returns cheapest price
add_filter( 'woocommerce_shipping_new_zealand_post_api_request', function( $request ) {
if ( isset( $request['value'] ) ) {
$request['value'] = 0;
}
return $request;
} );

The code needs to be pasted into your functions.php file in your WordPress websites theme.

nb. I accept no responsibility for the code breaking your site. Use at your own risk.

Thanks to the plugin support people!

FREE VIDEO TRAINING How to increase sales and profit for your WooCommerce store

FREE VIDEO TRAINING How to increase sales and profit for your WooCommerce store

A simple 5 step plan to increase sales and profit for your WooCommerce store without wasting money on ads

How much money are you leaving on the table?
Find out the 10 key conversion killing mistakes you might be making today.
Learn how I help my clients avoid them and make more sales.
 
Please enter your name.
Please enter a valid email address.
Something went wrong. Please check your entries and try again.

Running a successful sale

Sales are a powerful way to incentivise customers to buy. But are you using sales effectively to bring in new…

Read More

WooCommerce – Setting up PayPal & IPN correctly.

October 28, 2015 14/6/16 – To use WooCommerce and PayPal IPN from June 30th 2016 you will need to have…

Read More

Fight back – Stop losing sales to online stores

Many bricks and mortar business owners are worried about losing sales to online shopping. However there are advantages to both…

Read More