PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

[Shipping Related] Where to retrieve parameters for PHP?

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hello,

Before installing WOOCS, I only have one currency and therefore added this code into my child theme. What is does it show a small notice on cart page to tell customers to add more items to be eligible for free shipping.

add_action( 'woocommerce_before_cart', 'wc_add_notice_free_shipping' );

function wc_add_notice_free_shipping() {

$free_shipping_settings = get_option('woocommerce_free_shipping_1_settings');
$amount_for_free_shipping = $free_shipping_settings['min_amount'];

$cart = WC()->cart->subtotal;
$remaining = $amount_for_free_shipping - $cart;

if( $amount_for_free_shipping > $cart ){
$notice = sprintf("Add %s worth more products to get free shipping", wc_price($remaining));
wc_print_notice( $notice , 'notice' );
}

}

Right now, I have 2 currency and I do not know where to find the parameter or the different currencies':

woocommerce_free_shipping_1_settings

I will appreciate any help in the right direction (not hard coding). Thank you!

 

Hello

to get  the  data - https://currency-switcher.com/codex/#functions

To  convert  amount - https://currency-switcher.com/function/woocs-woocs_exchange_value/