MemberPress: Display User’s Course Progress in MemberPress Courses

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

MemberPress: Change Courses Listing Page Link

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

MemberPress: Change Stripe Checkout Description

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

MemberPress: Add Currency Codes To MemberPress

function mepr_currency_codes( $codes ) { array_push( $codes, ‘EGP’ ); // Adds ‘EGP’ to the list of currency codes. To add a different currency, replace EGP with the three-letter currency code of the needed currency. return $codes; // Return the modified…Continue reading