MemberPress: Require Coupon at Checkout

function mepr_must_fill_out_coupon_code( $errors ) { if( !isset($_POST[‘mepr_coupon_code’]) || empty($_POST[‘mepr_coupon_code’] ) ) { $errors[] = “You must fill out the Coupon code field before registering.”; } return $errors; } add_filter( ‘mepr-validate-signup’, ‘mepr_must_fill_out_coupon_code’, 11, 1 );Continue reading

Auto Vote 5 sao cho bài viết mới

function auto_vote_5_stars_on_publish($ID, $post) { if ($post->post_status === ‘publish’) { if (function_exists(‘kk_star_ratings_insert’)) { kk_star_ratings_insert(“5”, $ID); } } } add_action(‘publish_post’, ‘auto_vote_5_stars_on_publish’, 10, 2);Continue reading

MemberPress: Disable Admin Password Lost/Changed Email

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

Dynamic Year Copyright Shortcode

// Copy the Shortcode in the Insertion box below and paste it wherever you want the copyright symbol + year to be displayed. // This will output © 2023 or the current year automatically. echo “© ” . date( ‘Y’…Continue reading

Display stock status on category page

/** * @snippet Stock Availability @ WooCommerce Shop Page * @how-to Get CustomizeWoo.com FREE * @author Rodolfo Melogli * @compatible WooCommerce 7 * @donate $9 https://businessbloomer.com/bloomer-armada/ */ add_action( ‘woocommerce_after_shop_loop_item’, ‘bbloomer_show_stock_shop’, 10 ); function bbloomer_show_stock_shop() { global $product; echo wc_get_stock_html( $product…Continue reading

Freshdesk Support Widget

function add_freshworks_embed_code_script_in_admin() { echo ““; echo ““; } add_action( ‘admin_footer’, ‘add_freshworks_embed_code_script_in_admin’ );Continue reading