This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npx npm-check-updates -u | |
$ npm install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* For test and debug, log function to view any data in wp-content/debug.log | |
* uses: log_it($variable); | |
* | |
*/ | |
if ( ! function_exists( 'log_it' ) ) { | |
function log_it( $message ) { | |
if ( WP_DEBUG === true ) { | |
if ( is_array( $message ) || is_object( $message ) ) { | |
error_log( "\r\n" . print_r( $message, true ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Blacklist woocommerce customer registration | |
function blacklisted_user( $errors, $sanitized_user_login, $user_email ) { | |
// Blacklist email domains | |
$blacklist = ['tmomail.net', 'vtext.com', 'txt.att.net']; | |
$email_parts = explode( '@', $user_email ); | |
if ( is_numeric( $email_parts[0] ) ) { | |
// If the user email first part is numeric, add an error message | |
$errors->add( 'blacklist_error', '<strong>ERROR</strong>: This email is not allowed to register on this site.' ); |
OlderNewer