MemberPress: Change the “Username or E-mail” label on login form
function mepr_change_uname_or_email_text() { return ‘Custom text’; } add_filter(‘mepr_login_uname_or_email_str’, ‘mepr_change_uname_or_email_text’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function mepr_change_uname_or_email_text() { return ‘Custom text’; } add_filter(‘mepr_login_uname_or_email_str’, ‘mepr_change_uname_or_email_text’ );Continue reading
function allow_mc_through( $block, $post, $uri ) { if( isset( $_GET[‘allow_mailchimp’] ) ) { $block = false; } return $block; } add_filter( ‘mepr_pre_run_rule_content’, ‘allow_mc_through’, 11, 3 );Continue reading
function remove_plugin_filter() { remove_filter( ‘woocommerce_product_is_visible’, ‘MeprRulesCtrl::override_wc_is_visible’, 11, 2); remove_filter( ‘woocommerce_variation_is_visible’, ‘MeprRulesCtrl::override_wc_is_visible’, 11, 4); } add_action( ‘plugins_loaded’, ‘remove_plugin_filter’ );Continue reading
/** * Manually refresh all members’ data. * * Once this snippet is added, visit /wp-admin/?update-member-data=true on your site to update all member data. * After running the update, clear any site cache and check the Members page again. */…Continue reading
function mepr_custom_checkout_image() { ?>Continue reading
function mepr_change_role_canceled_subscription( $event ) { $subscription = $event->get_data(); if( 123 != ( int ) $subscription->product_id ) { return; } $user = $subscription->user(); $wp_user = get_user_by( ‘id’, $user->ID ); if( !$wp_user ) { return; } // Remove role $wp_user->remove_role( ‘subscriber’ );…Continue reading
add_action( ‘admin_init’, function() { if ( isset( $_GET[‘export_members_extended’] ) ) { $all = MeprUser::list_table( /* $order_by */ ‘user_login’, /* $order */ ‘ASC’, /* $paged */ ”, /* $search */ ”, /* $search_field */ ‘any’, /* $perpage */ ”, /* $params…Continue reading
function mepr_custom_pdf_invoice_fonts( $fonts ) { return array( ‘roboto’ => array( ‘R’ => ‘Roboto-Regular.ttf’, ‘B’ => ‘Roboto-Bold.ttf’, ‘I’ => ‘Roboto-Italic.ttf’, ‘BI’ => ‘Roboto-Bold.ttf’, //’useOTL’ => 0xFF, ‘useKashida’ => 75, ), ); } add_filter( ‘mepr_pdf_invoice_fonts’, ‘mepr_custom_pdf_invoice_fonts’ ); function mepr_custom_options_dynamic_attrs( $attrs ) {…Continue reading
function mepr_change_invoice_bill_to( $invoice, $txn ) { $user = $txn->user(); // Get company custom field. // Replace ‘mepr_company_name’ with the custom field slug. $company = get_user_meta( $user->ID, ‘mepr_company_name’, true ); // Return company name if not empty $name = ( !empty(…Continue reading
function mepr_extend_renewal_grace_days( $days ) { return 1; } add_filter( ‘mepr_grace_expire_days’, ‘mepr_extend_renewal_grace_days’ );Continue reading