Search Atlas
12873467-3b1b-467f-9a92-96a696e8a1c5Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
12873467-3b1b-467f-9a92-96a696e8a1c5Continue reading
add_filter( ‘render_block_tasty-roundups/child’, function ( $block ) { $initial_block = $block; $block = preg_replace( ‘~Continue reading
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
add_filter(‘mepr-member-signup-reminder-disable’, function($disable_email, $reminder, $usr, $prd) { // Array of email addresses for which the signup reminder email should be disabled $emails = array(‘[email protected]’, ‘[email protected]’); // Check if the user’s email is in the list if (in_array($usr->user_email, $emails)) { $disable_email =…Continue reading
add_filter(‘mepr-wp-mail-recipients’, function($recipients, $subject, $message, $headers) { if (strpos($subject, ‘Subscription renewal’) !== false) { foreach ($recipients as $key => $recipient) { // Extract the email address from the recipient field $regExp = “/]+)>/”; preg_match($regExp, $recipient, $matches); $recipient = $matches[1]; $wp_user =…Continue reading
function mepr_capture_recurring_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_recurring_sub’ function to the ‘mepr-event-subscription-payment-completed’ event. add_action( ‘mepr-event-transaction-completed’, ‘mepr_capture_recurring_sub’ );Continue reading
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