Home / Archive / MemberPress: Send Failed Transaction Notice When Admin Sets Transaction to Failed
Duplicate Snippet

Embed Snippet on Your Site

MemberPress: Send Failed Transaction Notice When Admin Sets Transaction to Failed

When a website administrator changes the member’s transaction status to Failed in the WordPress Dashboard > MemberPress > Transactions page, no notice email will be sent.

When this code snippet is added to a website, the above-described event will automatically trigger the default Payment Failed notification email for both the administrator and the member.

Code Preview
php
<?php
function mepr_custom_failed_status_email( $txn ) {
  \MeprUtils::send_failed_txn_notices( $txn );
}
add_action( 'mepr-txn-status-failed', 'mepr_custom_failed_status_email' );

Comments

Add a Comment