In order for the
Now I can get details about the coupon like so
WC_Coupon
function to work, I needed to add the "new" keyword prior to calling the function. As demonstrated below.1 2 3 | $coupon_code = 'save10percent' ; global $woocommerce ; $c = new WC_Coupon( $coupon_code ); |
123456echo
"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
Apollo Medical Ptv Ltd is here to provide you affordable medical billing services around the globe. Our trained and certified coding specialist are here to help you provide medical billing soultions. Get our services today!
ReplyDeletemedical billing specialist