Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wc php get order get coupon discount amount

foreach( $order->get_coupon_codes() as $coupon_code ) {
    // Get the WC_Coupon object
    $coupon = new WC_Coupon($coupon_code);

    $discount_type = $coupon->get_discount_type(); // Get coupon discount type
    $coupon_amount = $coupon->get_amount(); // Get coupon amount
}
Comment

PREVIOUS NEXT
Code Example
Php :: dql if or ifnull 
Php :: publish laravel scout 
Php :: how to upload images to sql database php PDO 
Php :: php: foreach loop 
Php :: resource route laravel 
Php :: laravel find query 
Php :: php mailer 
Php :: what is is_null in php 
Php :: php multiple array to single array 
Php :: create custom rule in laravel 
Php :: laravel data type 
Php :: display picture in pdf generated with laravel 
Php :: wordpress migrate plugin 
Php :: php oop crud database 
Php :: variable superglobale php 
Php :: User::factory()-create( 
Php :: php mask credit card number 
Java :: how to iterate through an array backwards java 
Java :: bukkit scoreboard 
Java :: android copy text to clipboard programmatically 
Java :: java log base 2 
Java :: loop through dictionary java 
Java :: android cardview dependency 
Java :: java selenium new empty tab 
Java :: refresh activity android 
Java :: array to map java7 
Java :: how to create progress dialog programmatically in android 
Java :: add label gui jframe 
Java :: how to get the time in java 
Java :: take string array input in java 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =