• Resolved sadiqodunsi

    (@sadiqodunsi)


    Hi,

    I would like to prevent debit transaction emails on my site.

    Kindly review my code below to confirm that it is fine.

        /**
    	 * Prevent debit transaction emails.
    	 */    
    add_filter( 'woocommerce_email_recipient_new_wallet_transaction', 'prevent_debit_email, 10, 3 );
        function prevent_debit_email( $recipient, $user, $transaction ) {
            if ( $transaction->type === 'debit' ) {
                return false;
            }
            return $recipient;
        }

    Thanks a lot.
    Sadiq

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Please review my code to prevent debit transaction emails’ is closed to new replies.