Search
Close this search box.

Retrieve coupon details from coupon code WooCommerce

Amitpal Singh
Amitpal Singh
October 8, 2021


$coupon_code = 'TASTY10';
global $woocommerce;
$c = new WC_Coupon($coupon_code);

echo "Discount Amount ".$c->amount."
";//Get Discount amount
echo "Discount Type ".$c->discount_type."
";//Get type of discount
echo "Individual Use ".$c->individual_use."
";//Get individual use status
echo "Usage Count ".$c->usage_count."
";//Get number of times the coupon has been used
echo "Uage Limit ".$c->usage_limit."
";//Get usage limit
echo "Coupon Description ".$c->description."
";//Get coupon description

Share this post:

How to Attribute?

Lorem ipsum is typically a corrupted version of De finibus bonorum et malorum, a 1st-century BC text by the Roman statesman and philosopher Cicero.
for Example: Website, Social Media, Blogs, ebooks , newsletter, etc.
Lorem ipsum is typically a corrupted version of De finibus bonorum et malorum, a 1st-century BC text by the Roman statesman and philosopher Cicero.
Copied!

Got a Question? Check out our FAQ Section.

Your action, our appreciation

It encourage us to give you more valuable content on website.