/** * The following will restrict login to a * specific IP address. * * Change "111.111.111.111" to the actual IP. */ add_action( …
Add cc and bcc to wp_mail() headers
$headers[] = 'From: Some One '; $headers[] = 'Cc: cc_number_1@email.com'; $headers[] = 'Cc: cc_number_2@email.com'; $headers[] = …
Random Number Generator
/** * Generates a random number of a fixed number of digits. * * The use of STR_PAD_LEFT allows the result to ALWAYS be the given …
Remove WP emoji scripts from header
/** * This snippet removes the WP emoji code from the WP header. */ remove_action( 'wp_head', …
Remove WP emoji code from site header
/** * The following removes the WP emoji code from your site's header. * * Note the priority "7" for the wp_head remove action. This …
Shortcode to display list of categories
/** * This creates the [my_cat_list] shortcode. * * The shortcode will display a list of categories. * * @link …
Decrease Password Strength Requirements for WooCommerce
/** * Change WooCommerce required password strength. * * WooCommerce password strength requirement is determined by an integer …
Remove WooCommerce Password Strength Meter
add_action( 'wp_print_scripts', 'my_woo_remove_password_strength', 10 ); function my_woo_remove_password_strength() { …
Set user role to WordPress default role during WooCommerce checkout
add_filter( 'woocommerce_new_customer_data', 'my_custom_user_data'); function my_custom_user_data( $new_customer_data ) { …