Home / Archive / MemberPress: Override ReadyLaunch Description For The Specific Payment Method on Click
Duplicate Snippet

Embed Snippet on Your Site

MemberPress: Override ReadyLaunch Description For The Specific Payment Method on Click

The code snippet works on the ReadyLaunch™ registration pages only.

This code snippet will override the description text set for the specific payment method in MemberPress settings. When the label for this payment method is clicked on the ReadyLaunch registration page, the custom description from the code snippet will be displayed. This code snippet can be applied to PayPal and Offline payment methods.

The code sample below will apply the custom description to the PayPal payment method.

To apply the custom description to the offline payment method, replace the .payment-option-paypal class with the class .payment-option-offline, in this line:

$(document).on('click', '.payment-option-paypal', function() {

Also, replace .mepr-payment-method-paypal with .mepr-payment-method-offline in this line of code:

$('.mepr-payment-method-paypal .mepr-payment-method-desc-text p').text(newText);

The custom description can be adjusted by modifying the New text you want to display text in this line of code:
var newText = 'New text you want to display';

Code Preview
js
jQuery(document).ready(function($) {
    // Listen for a click event on the payment method label
    $(document).on('click', '.payment-option-paypal', function() {
        // Change the text of the <p> element within the specific payment method description
        var newText = 'New text you want to display'; // Replace with your desired text
        $('.mepr-payment-method-paypal .mepr-payment-method-desc-text p').text(newText);
    });
});

Comments

Add a Comment