Price Based on Country Pro 2.4 is here

by Oscar on 19 October, 2018

Price Based on Country Pro 2.4 has been released. 2.4 is a “maintenance” release and includes a new feature that allows developers to get the order totals in the shop base currency.

Getting the order in the shop base currency in a multi-currency WooCommerce store

This release includes the new class WCPBC_Order_Base_Currency that extend the WooCommerce class WC_Order.
To get an order in the shop base currency, you only need to create an instance of the WCPBC_Order_Base_Currency class with the order ID and use the same methods and properties of the WC_Order class:

To get the order total:

$order_base = new WCPBC_Order_Base_Currency( 6558 );
echo $order_base->get_total();

To get the total of the line items:

$order_base = new WCPBC_Order_Base_Currency( 6558 );
$items      = $order_base->get_items();
foreach( $items as $item ) {
    echo $item->get_total();

Help Make WC Price Based on Country Better

If you have any feedback at all we’d love to hear it. Just contact us by our contact form.

2.4 Changelog

Here’s a full changelog for everything in these new releases:

* Added: New classes to get the order in the shop base currency.
* Added: Built-in integrations compatible with the pricing zone object.
* Tweak: "Product not found" message in shortcode.
* Fixed: AJAX geolocation displays product Add-ons without taxes.
* Fixed: Product Add-ons currency format supports to AJAX geolocation.
* Fixed: Error getting AffiliateWP exchange rates.

Upgrading to 2.4

WooCommerce Price Based on Country Pro 2.4 is available for all Personal and Bussines license holders. If you do not have a license yet, you can buy with just a couple of clicks from pricing page.

Leave a Reply