Home / Archive / MemberPress: Create a Fallback Downgrade When a Transaction Fails
Duplicate Snippet

Embed Snippet on Your Site

MemberPress: Create a Fallback Downgrade When a Transaction Fails

By default, the transaction has to expire, be canceled, or be refunded to create the fallback transaction. When using MemberPress Groups, if a member’s transaction fails this can leave a user without access.

This code snippet is used to create a fallback downgrade when a transaction fails and prevent issues for users.

Code Preview
php
<?php
function mepr_fallback_failed_txn( $txn ) {
  MeprGroupsCtrl::create_fallback( $txn );
}
add_action( 'mepr-txn-status-failed', 'mepr_fallback_failed_txn' );

Comments

Add a Comment