MemberPress: Manually Refresh Member Data

/** * 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

MemberPress: Export Account Type in CSV

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

MemberPress: Replace Font-Family for PDF Invoice

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

MemberPress: Free-Views-Used Counter

function mepr_display_cookie() { $free_views = isset( $_COOKIE[‘mp3pi141592pw’]) ? base64_decode( $_COOKIE[‘mp3pi141592pw’] ) : false; if( $free_views !== false ) { echo ‘You used ‘ . $free_views . ‘ free views!’; } } add_action( ‘init’, ‘mepr_display_cookie’ );Continue reading

MemberPress: Disable the Default WordPress Password Reset Link E-Mail

function mepr_disable_password_reset_email( $recipients, $subject, $message, $headers ) { $set_password_notification_subject = MeprHooks::apply_filters( ‘mepr_set_new_password_title’, sprintf( __( “[%s] Set Your New Password”, ‘memberpress’ ), MeprUtils::blogname() ) ); if ( $subject == $set_password_notification_subject ) { $recipients = array(); } return $recipients; } add_filter( ‘mepr-wp-mail-recipients’,…Continue reading