function block_blogspot_username($user_login, $user_email, $errors) { // Check if the username contains "blogspot" if (strpos($user_login, 'blogspot') !== false) { $errors->add('blogspot_error', 'Registrations with blogspot in the username are not allowed.'); } } add_action('user_profile_update_errors', 'block_blogspot_username', 10, 3); add_action('woocommerce_registration_errors', 'block_blogspot_username', 10, 3); {"code":"rest_post_invalid_id","message":"Invalid post ID.","data":{"status":404}}