-3

I want to create a page after order complete with woocommerce which shows some ads or coupons when click on user click on any ads or coupon(button), email will receive to user with coupon code and admin will receive email with user data. How to implement this functionality?

  • After order complete u have thankyou page which u can modify to w/e u want. Clicking on banner and send email should be with ajax atleast. This is not a place for free coding. – Snuffy Jul 27 '22 at 06:17

1 Answers1

0

If you need to send custom mail you can use wp_mail() wordpress function for that.

  1. You can use hook after order is completed ('woocommerce_thankyou' example)
  2. Use wp_mail() function and send mail with data. You can check it here: https://developer.wordpress.org/reference/functions/wp_mail/

If you need to do this when someone click on banner or ad on page, then you need ajax call.

I think this help

  • Can you please help with ajax call function? – pooja T Jul 27 '22 at 09:35
  • All about WP and ajax can check here: just follow steps. [link](https://wpmudev.com/blog/using-ajax-with-wordpress/). For Your situation, you must make ajax call when someone click on your ad/banner. If You still need help notice me. – Arsic Aleksandar Jul 27 '22 at 13:14