MemberPress: Change Stripe Checkout Description

function mepr_change_stripe_checkout_desc($desc, $payment) { if (isset($payment->settings->stripe_checkout_enabled) && $payment->settings->stripe_checkout_enabled == ‘on’) { $desc = “Pay with Apple Pay”; // Edit this. } return $desc; } add_filter(‘mepr_signup_form_payment_description’, ‘mepr_change_stripe_checkout_desc’, 10, 2);Continue reading

MemberPress: Add Currency Codes To MemberPress

function mepr_currency_codes( $codes ) { array_push( $codes, ‘EGP’ ); // Adds ‘EGP’ to the list of currency codes. To add a different currency, replace EGP with the three-letter currency code of the needed currency. return $codes; // Return the modified…Continue reading

MemberPress: Filter Email Recipients Based on Expired Memberships

add_filter(‘mepr-wp-mail-recipients’, function($recipients, $subject, $message, $headers) { if (strpos($subject, ‘Subscription renewal’) !== false) { foreach ($recipients as $key => $recipient) { // Extract the email address from the recipient field $regExp = “/]+)>/”; preg_match($regExp, $recipient, $matches); $recipient = $matches[1]; $wp_user =…Continue reading

MemberPress: Enabling Payment Receipt Email for Free Recurring Subscriptions

function mepr_capture_recurring_sub( $event ) { // Get the transaction data from the event $txn = $event->get_data(); // Send the transaction receipt email MeprUtils::send_transaction_receipt_notices( $txn ); } // Attach the ‘mepr_capture_recurring_sub’ function to the ‘mepr-event-subscription-payment-completed’ event. add_action( ‘mepr-event-transaction-completed’, ‘mepr_capture_recurring_sub’ );Continue reading

MemberPress: Enabling Payment Receipt Email for Free Non-recurring Subscriptions

function mepr_capture_new_one_time_sub( $event ) { // Get the transaction data from the event $txn = $event->get_data(); // Send the transaction receipt email MeprUtils::send_transaction_receipt_notices( $txn ); } // Attach the ‘mepr_capture_new_one_time_sub’ function to the ‘mepr-event-non-recurring-transaction-completed’ event. add_action( ‘mepr-event-non-recurring-transaction-completed’, ‘mepr_capture_new_one_time_sub’ );Continue reading

MemberPress: Change Email Subject in Bulk

function mepr_change_subject($subject, $recipients, $message, $headers) { if (strpos(strtolower($subject), ‘your new password’) !== false) { $subject = ‘Your New Password on yourdomain.com’; } return $subject; } add_filter(‘mepr-wp-mail-subject’, ‘mepr_change_subject’, 10, 4);Continue reading