Created
March 23, 2026 05:56
-
-
Save xlplugins/c2feaf4eb20c3b16b38fa9e1005b21e9 to your computer and use it in GitHub Desktop.
Funnelkit Cart : Free Shipping min amount set based on the currency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'fkcart_free_shipping', function ( $options ) { | |
| // Ensure $options is an array. | |
| if ( false === $options ) { | |
| $options = []; | |
| } | |
| // Get current store/order currency (works with multi-currency plugins that hook into WooCommerce). | |
| $currency = get_woocommerce_currency(); | |
| // Set min amount based on currency. | |
| if ( 'USD' === $currency ) { | |
| // Example for USD. | |
| $options['method_id'] = ''; | |
| $options['min_amount'] = 30; | |
| } elseif ( 'EUR' === $currency ) { | |
| // Example for Euro. | |
| $options['method_id'] = ''; | |
| $options['min_amount'] = 60; | |
| }elseif ( 'GBP' === $currency ) { | |
| // Example for Great Britain Pound. | |
| $options['method_id'] = ''; | |
| $options['min_amount'] = 90; | |
| } else { | |
| // Default for all other currencies. | |
| $options['method_id'] = ''; | |
| $options['min_amount'] = 100; | |
| } | |
| return $options; | |
| } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment