• Resolved Craig1986

    (@craig1986)


    I am currently using the ‘First Order Discount‘, in order to generate a WooCommerce Coupon but restrict it to just first orders.

    It worked until processed an order. I then deleted the Coupon/Plugin, reinstalled it, and tested it with another account, which had not made an order yet. Whenever I now head into the Basket/Cart,I get a message saying ‘Coupon already applied’, even though the newly created Coupon code has yet to be used.

    Maybe the Coupon code is being stored in the Database. To test this possibility, how do I delete all reference/data regarding previously created Coupon codes within the MySql Database? I went into wp_posts but could not find anything. Maybe I am looking in the wrong place.

Viewing 1 replies (of 1 total)
  • madeincosmos

    (@madeincosmos)

    Automattic Happiness Engineer

    Hi @craig1986,

    WooCommerce coupons are a custom post type, so they are stored in wp_posts along with other posts, shop orders, and products. Each coupon also has specific info (such as discount amount, usage restriction, etc) saved in the wp_postmeta table.

    To filter only the records that contain information about the coupons themselves, you can try the following query:

    
    SELECT * FROM wp_posts WHERE post_type = 'shop_coupon'
    

    If this doesn’t help, I’d recommend to reach out to the authors for the First Order Discount plugin so they can help you find out what went wrong and how to fix it.

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘How do I delete all WooCommerce Coupon data in the MySql Database?’ is closed to new replies.