Fix bug when filtering for customer_id=0. (#36216)

This commit is contained in:
Néstor Soriano 2023-01-05 14:41:23 +01:00 committed by GitHub
commit b15639ee6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix bug when filtering for customer_id=0.

View File

@ -279,7 +279,7 @@ class WC_REST_Orders_Controller extends WC_REST_Orders_V2_Controller {
? $request['customer']
: null;
if ( $cot_customer ) {
if ( ! is_null( $cot_customer ) ) {
unset( $request['customer'] );
}