• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2899

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Checkout

Free Shipping Coupon Minimum Spend WooCommerce

$75.00

Demo Video
Category: WooCommerce Tags: get_applied_coupons, method_id, woocommerce_package_rates
  • Description
  • Reviews (0)

This PHP code removes all shipping options except free shipping based on 2 conditions :

  1. A minimum spend limit which is set in Marketing > Coupons > Coupon Data > Minimum Spend.
  2. When a coupon is applied on the cart or checkout page.

In this example, we create a coupon :

  • with a $10 coupon amount( you can add a coupon without an amount and use any discount type )
  • without checking the “Allow free shipping”. ( you can enter a coupon expiry date )
  • without any “Usage restriction” ( you can add any restrictions )
  • without any Usage “limits” ( you can add any limits you like ).

Demo Coupon Settings

Shows the exact settings used in the demo. The only compulsory settings are the coupon name. The minimum spend is optional.

General Coupon Settings
Usage Restrictions Coupon Settings
Usage Limits Coupon Settings

Installation

  1. Copy & paste the PHP code to the end of your child themes functions.php file or custom functionality plugin.

  2. Set your coupon name on line 11.

  3. Create a coupon with the same name as used on line 11.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Primary Sidebar

Written by Brad Dalton specialist for WooCommerce. Read More…

Advertise · WPEngine · Genesis · Log in

  • Code Snippets
  • Tutorials
  • Videos
  • Tags
  • Account
  • Checkout
  • Cart
  • Hire Me
 

Loading Comments...
 

You must be logged in to post a comment.