Skip to content

Commit

Permalink
fix: unable create customer using WC_Rest API is fixed #578 #533 (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
saimonh3 authored and sabbir1991 committed Mar 5, 2019
1 parent a11f433 commit c60d1cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/class-registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ function validate_registration( $error ) {
return $error;
}

if ( defined( 'WP_CLI' ) || defined( 'REST_REQUEST' ) ) {
return $error;
}

$post_data = wp_unslash( $_POST );

$nonce_value = isset( $post_data['_wpnonce'] ) ? $post_data['_wpnonce'] : '';
Expand Down

0 comments on commit c60d1cb

Please sign in to comment.