MemberPress: Enabling Payment Receipt Email for Free Non-recurring Subscriptions

function mepr_capture_new_one_time_sub( $event ) { // Get the transaction data from the event $txn = $event->get_data(); // Send the transaction receipt email MeprUtils::send_transaction_receipt_notices( $txn ); } // Attach the ‘mepr_capture_new_one_time_sub’ function to the ‘mepr-event-non-recurring-transaction-completed’ event. add_action( ‘mepr_event_non_recurring_transaction_completed’, ‘mepr_capture_new_one_time_sub’ );Continue reading

MemberPress: Classic Editor Fix for Courses

add_filter( ‘classic_editor_enabled_editors_for_post_type’, function ( $editors, $post_type ) { if ( $post_type == ‘mpcs-course’ || $post_type == ‘mpcs-lesson’ || $post_type = ‘mpcs-quiz’ ) { $editors[‘classic_editor’] = false; } return $editors; }, 10, 2 );Continue reading

MemberPress: Add the Invoice Number to the Transactions Screen

add_filter(‘mepr_admin_transactions_cols’, function ($cols) { $cols[‘col_txn_invoice’] = __(‘Invoice No.’, ‘memberpress-pdf-invoice’); return $cols; }); add_action(‘mepr_admin_transactions_cell’, function ($column_name, $rec, $attributes) { if ($column_name === ‘col_txn_invoice’) { ?>Continue reading

MemberPress: Unsubscribed Memberships Shortcode

add_shortcode( ‘mepr-unsubscribed-memberships’, function () { $args = array( ‘post_type’ => ‘memberpressproduct’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ); $memberships = new WP_Query( $args ); ob_start(); if ( $memberships->have_posts() ) { echo ‘ ‘; while ( $memberships->have_posts() ) { $memberships->the_post(); $post_ID…Continue reading