The standard message we display when a payment fails during the registration process can be changed with the following code:
add_filter('pms_payment_error_message', 'pmsc_change_payment_error_message', 20, 2);
function pmsc_change_payment_error_message($error, $is_register) {
if ($is_register == '1') {
$error = __('Something went wrong while trying to process the payment. Your account has been created, so please log in and retry the payment.', 'paid-member-subscriptions');
}
return $error;
}
Customize the message from the $error variable.
In this example, I am adding a link to the /login page over the log in words.
Accept (recurring) payments, create subscription plans and restrict content on your website. Easily setup a WordPress membership site using Paid Member Subscriptions.
Get Paid Member SubscriptionsCombine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.
Get 25% off with the bundle