function mepr_disable_admin_pw_changed_email( $recipients, $subject, $message, $headers ) { if( strpos( $subject, ‘Password Lost/Changed’ ) !== false ) { $recipients = array(); // no recipients } return $recipients; } add_filter( ‘mepr-wp-mail-recipients’, ‘mepr_disable_admin_pw_changed_email’, 11, 4 );Continue reading
function mepr_remove_countries( $countries, $prioritize_my_country ) { return array ( ‘DE’ => _x( ‘Germany’, ‘ui’, ‘memberpress’ ) ); } add_filter( ‘mepr_countries’, ‘mepr_remove_countries’, 10, 2 );Continue reading
function redirect_to_bestellen_after_login($redirect, $user) { $redirect_page_id = get_page_by_path(‘bestellen’); //slug van de doelpagina if ($redirect_page_id) { $redirect = get_permalink($redirect_page_id); } return $redirect; } add_filter(‘woocommerce_login_redirect’, ‘redirect_to_bestellen_after_login’, 10, 2);Continue reading
// Leidt niet-ingelogde gebruikers om van de /bestellen pagina naar de /my-account pagina. // Als de gebruiker is ingelogd, kunnen ze de /bestellen pagina normaal bekijken. function redirect_non_logged_users() { if (is_page(‘bestellen’) && !is_user_logged_in()) { //doelpagina ‘bestellen’ wp_redirect(site_url(‘/mijn-account’)); //redirect bestemming ‘/mijn-account’…Continue reading
function mepr_exclude_protected_posts_from_archive( $query ) { if( !$query->is_admin && $query->is_archive() && $query->is_main_query() ) { $posts_to_exclude = array(); $posts = get_posts( array( ‘numberposts’ => -1 ) ); foreach( $posts as $post ) { if( MeprRule::is_locked( $post ) ) { $posts_to_exclude[] = $post->ID;…Continue reading
function mepr_exclude_protected_posts_from_search( $query ) { if( !$query->is_admin && $query->is_search && $query->is_main_query() ) { $posts_to_exclude = array(); $posts = get_posts( array( ‘post_type’ => get_post_types(), ‘numberposts’ => -1 )); foreach( $posts as $post ) { if( MeprRule::is_locked( $post ) ) { $posts_to_exclude[]…Continue reading
function auto_click_have_coupon_link() { ?>Continue reading
/** * Insert template at the bottom of the mobile menu. */ add_action( ‘wpex_hook_mobile_menu_bottom’, function() { echo do_shortcode( ‘[wpex_template id=”YOUR_TEMPLATE_ID”]’ ); } );Continue reading
add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_script( ‘edd-pro-checkout’ ); }, 50 );Continue reading
function jp_inject_the_content() { remove_action( ‘digitalstore_store_front’, ‘digitalstore_front_latest_downloads’, 2 ); add_action( ‘digitalstore_store_front’, ‘digitalstore_front_latest_downloads’, 3 ); add_action( ‘digitalstore_store_front’, ‘jp_add_content’, 2 ); } add_action( ‘init’, ‘jp_inject_the_content’ ); function jp_add_content() { echo apply_filters( ‘the_content’, get_post_field( ‘post_content’, get_the_ID() ) ); } add_action( ‘init’, ‘jp_add_content’ );Continue reading