MemberPress: Generate All Invoices

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

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

Prevent AIOSEO From Rewriting Term Title

add_filter( ‘aioseo_disable_title_rewrites’, ‘aioseo_disable_term_title_rewrites’ ); function aioseo_disable_term_title_rewrites( $disabled ) { if ( is_category() || is_tag() || is_tax() ) { return true; } return false; }Continue reading