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
function generate_bulk_invoices() { if( isset( $_REQUEST[ ‘generate-invoices’ ] ) ) { global $wpdb; $query = “SELECT id FROM {$wpdb->prefix}mepr_transactions WHERE status in (‘complete’, ‘confirmed’, ‘refunded’)”; $txn_ids = $wpdb->get_results( $query ); foreach( $txn_ids as $txn_id ) { $invoices = new MePdfInvoicesCtrl();…Continue reading
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