Search
 
SCRIPT & CODE EXAMPLE
 

PHP

woocommerce coupon notifie a spefic email

add_action( 'woocommerce_applied_coupon', 'custom_email_on_applied_coupon', 10, 1 );
function custom_email_on_applied_coupon( $coupon_code ){
    if( $coupon_code == 'bob' ){

        $to = "jack.hoover@gmail.com"; // Recipient
        $subject = sprintf( __('Coupon "%s" has been applied'), $coupon_code );
        $content = sprintf( __('The coupon code "%s" has been applied by a customer'), $coupon_code );

        wp_mail( $to, $subject, $content );
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: Deprecated: Implicit conversion from float 
Php :: how to calculate position of student in class in laravel 
Php :: menyimpan get di laravel 
Php :: laravel How do I chain multiple where and orWhere clause in laravel from an Array [duplicate] 
Php :: sample test tinker php artisan 
Php :: PHP Parse error: Unexpected character "" (ASCII 22) on line 1 
Php :: store data array in php of input field 
Php :: wordpress php 
Php :: php artisan tinker get records 
Php :: membership_registration: city or town 
Php :: laravel 7 factory tinker 
Php :: custom end-point request php-salesforce-rest-api 
Php :: Laravel appends child when referencing it in attribute function 
Php :: WP Hero Img 
Php :: post factory faker 
Php :: clear laravel cache and clear vue 
Php :: php ffi get load average 
Php :: Unable to open sqlite DB file from js axios.get request 
Php :: Find template serving current page 
Php :: Unregistering a variable with $_SESSION. 
Php :: woocommerce show percentage in sales badge 
Php :: foreach in json object php 
Php :: union type php does not work 
Php :: php mysqli connect to two databases pdo 
Php :: Laravel database insert with combining array and string 
Php :: Detecting specifically the My account "Dashboard" page 
Php :: laravel rename file ftp 
Php :: wordpress ftp functions.php 
Php :: how to auto calculate price in mysql table and php 
Php :: désinfecte email php 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =