Archives: Snippets
MemberPress: Extend Grace Period for Renewals
function mepr_extend_renewal_grace_days( $days ) { return 1; } add_filter( ‘mepr-grace-expire-days’, ‘mepr_extend_renewal_grace_days’ );Continue reading
G-T2XZDKK0J5Continue reading
G-T2XZDKK0J5Continue reading
Mail Chimp
HubSpot tracking code
Сортировка методов доставки СДЭК по стоимости, от дешевых к дорогим
/** * Sorting SDEK shipping methods by cost, from cheap to expensive * * @param array $rates Array of shipping methods * * @return array */ add_filter( ‘woocommerce_package_rates’, function( $rates ) { if( empty( $rates ) || ! is_array( $rates…Continue reading
MemberPress: Free-Views-Used Counter
function mepr_display_cookie() { $free_views = isset( $_COOKIE[‘mp3pi141592pw’]) ? base64_decode( $_COOKIE[‘mp3pi141592pw’] ) : false; if( $free_views !== false ) { echo ‘You used ‘ . $free_views . ‘ free views!’; } } add_action( ‘init’, ‘mepr_display_cookie’ );Continue reading
MemberPress: Disable the Default WordPress Password Reset Link E-Mail
function mepr_disable_password_reset_email( $recipients, $subject, $message, $headers ) { $set_password_notification_subject = MeprHooks::apply_filters( ‘mepr_set_new_password_title’, sprintf( __( “[%s] Set Your New Password”, ‘memberpress’ ), MeprUtils::blogname() ) ); if ( $subject == $set_password_notification_subject ) { $recipients = array(); } return $recipients; } add_filter( ‘mepr-wp-mail-recipients’,…Continue reading
Output og:image that uses the Large Size Image
add_filter( ‘aioseo_thumbnail_size’, function( $imageSize ) { return ‘large’; } );Continue reading