Woocommerce: Coupon for new customer / first order only


woocommerceOne of my customer request to offer a coupon for all new customer / first order only. But i do not manage to find any free plugin that able to achieve this. So i decided to dig into woocommerce checkout process and write my own function to achieve this.

To apply coupon for new customer in Woocommerce, follow the steps below:-

Advertisements

  • Before apply the code below, you have to create a new COUPON. I’ve created a new coupon name ‘firstlove’
  • Now you can copy and paste the code below into your theme functions.php
  • once done, you can try to apply the coupon code for a new customer. It should work as expected.

If the code above could not satisfied your requirement, you can freely modify.

Happy Coding!

Related posts:






Share this with your friends:-

2 Responses to “Woocommerce: Coupon for new customer / first order only”

  1. chua says:

    should be working.

  2. Tommy Damani says:

    Hey man can you please tell me if this code is still good to use with the current WooCommerce?

Leave a Reply