How can i fetch minimum order amount required to get free shipping ( woocommerce_free_shipping_min_amount
which is set in admin panel woocommerce -> settings -> shipping -> free shipping -> minimum order amount ) in woocommerce?
I want to display this price in front-end page
With WooCommerce Order Minimum Amount module you can set a minimum order amount by simply entering the total into the “Amount” field in the admin under WooCommerce > Booster Settings > Shipping & Orders > Order Minimum Amount.
Navigate to a WooCommerce Product and open the Shipping tab. Check (or uncheck) the “Exclude Free Shipping” checkbox.
This value is stored in an option
under the key woocommerce_free_shipping_settings
. It is an array that is loaded by the WC_Settings_API->init_settings()
.
If you want to get access to it directly you can use get_option()
:
$free_shipping_settings = get_option( 'woocommerce_free_shipping_settings' );
$min_amount = $free_shipping_settings['min_amount'];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With