function mpimp_load_expanded_coupon_importer() { global $mpimp; $mpimp->importers[‘couponaffiliate’] = ‘MpimpExtendedCouponsImporter’; } add_action(‘admin_init’, ‘mpimp_load_expanded_coupon_importer’, 110); //has to be after the MP hook function runs class MpimpExtendedCouponsImporter extends MpimpCouponsImporter { public function form() { } public function import($row,$args) { $ea_active = is_plugin_active(‘easy-affiliate/easy-affiliate.php’) ? true…Continue reading
function mepr_newuser_approve_override($user_id) { // Define an array of membership IDs for which the verification step should be skipped. $auto_approve = array(123, 456, 789); if(!class_exists(‘MeprOptions’)) { return; } if(!isset($_POST[‘mepr_product_id’]) && !isset($_POST[‘manage_sub_accounts_form’])) { return $user_id; } $product_id = isset($_POST[‘mepr_product_id’])?$_POST[‘mepr_product_id’]:false; if(isset($_POST[‘manage_sub_accounts_form’]) || ($product_id…Continue reading
add_shortcode( ‘mpcs_user_courses_progress’, function() { $user_id = get_current_user_id(); $courses = get_posts(array( ‘posts_per_page’ => -1, ‘post_type’ => ‘mpcs-course’ )); ob_start(); echo ‘ ‘; foreach ( $courses as $course ) { $course = new memberpress\courses\models\Course($course->ID); $progress = $course->user_progress($user_id); if ( $progress < 100…Continue reading
[[“Log in to recommend notes that understand you better”,”Available”,”Little Red Book”,”or”,”WeChat”,”Scan the QR code”,”How to scan code on Xiaohongshu”,”or”,”+86″,”New users can log in directly”,”recommend”,”Recommend more exciting things for you”,”Outfit”,”gourmet food”,”Makeup”,”Film and Television”,”Workplace”,”emotion”,”Home”,”game”,”travel”,”fitness”,”\u003ca i=0\u003eWhen I was a kid, my dad said…Continue reading
function mepr_cust_tax_rate( $tax_rate, $country, $prd_id ) { // If Membership ID 14 and country is Germany ‘DE’ if ( $prd_id === 123 && $country === ‘DE’ ) { $tax_rate->tax_rate = 0; // Set tax rate to 0 } return $tax_rate;…Continue reading
add_filter( ‘post_type_archive_link’, function ( $link, $post_type ) { if ( $post_type == ‘mpcs-course’ ) { $link = home_url() . ‘/courses/’; //replace the word courses with the custom page or post slug } return $link; }, 10, 2 );Continue reading
// Add custom JavaScript to display a message before the payment method icons function add_payment_method_message() { ?>Continue reading
add_filter(‘mepr_stripe_checkout_session_args’, function($args) { $args[‘phone_number_collection’] = [ ‘enabled’ => ‘true’ ]; return $args; });Continue reading
function mepr_change_stripe_checkout_desc($desc, $payment) { if (isset($payment->settings->stripe_checkout_enabled) && $payment->settings->stripe_checkout_enabled == ‘on’) { $desc = “Pay with Apple Pay”; // Edit this. } return $desc; } add_filter(‘mepr_signup_form_payment_description’, ‘mepr_change_stripe_checkout_desc’, 10, 2);Continue reading