$discount_type = $coupon->get_discount_type(); // Get coupon discount type
Here is a nice snippet that i really like. It will allow you to show the coupon codes used in order on the order edition page, and on the ...
I think this will solve your problem. I tested the code and it worked as: echo order no; echo used coupons for this order no; run step 1 and step 2 ...
Im trying to get orders in WooCommerce (ideally through wc_get_orders) where the coupon code "some_code" was used. My try: function ...
You can customize the “$to” variable and define your own email address, and the “$message” to have your own text. Add this code to your child theme's functions.
includes/class-wc-order-item-coupon.php : 15
WooCommerce - display order coupons used in confirmation email and edit order page - gist:7370707.
Coupons are a great way to offer discounts and rewards to your customers, and ... or that need to be in the cart in order for the fixed or percentage discount to be ...
You could do this for any post type created by WooCommerce, such as orders or products, as well. Get All Posts for a WordPress Post Type. The ...
Note: the order must be unpaid for coupons to have an affect; Add fee. You can ...