MemberPress: Remove State Field for ReadyLaunch™

function trim_down_address_fields( $options ) { foreach( $options->address_fields as $i => $o ) { if( $o->field_key == ‘mepr-address-state’ ) { unset( $options->address_fields[$i] ); } } return $options; } add_filter( ‘mepr_fetch_options’, ‘trim_down_address_fields’ ); //Add a fake state value to each user function…Continue reading

MemberPress: Set the order of payment methods

function mepr_rearrange_payment_methods( $payment_methods, $key ) { //Modify the order of the payment methods below according to your needs. You can also remove non needed payment methods $order = array( “PayPal Standard”, “Stripe”, “Authorize.net Profile”, “Offline Payment”, ); $pm_map = array();…Continue reading

Add Textbox To Donation Form

/** * Collect a textarea field in the donation form. * * This snippet only works in Charitable 1.5 or above. * */ function ed_charitable_register_new_checkbox_fields() { /** * Define a new checkbox field. */ if ( ! class_exists(“Charitable_Donation_Field” ) )…Continue reading