diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index 89dc9272e48..ae0e4e131fe 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -1298,8 +1298,8 @@ class WC_API_Products extends WC_API_Resource { $attributes = array(); foreach ( $data['attributes'] as $attribute ) { - $is_taxonomy = 0; - $taxonomy = 0; + $is_taxonomy = 0; + $taxonomy = 0; if ( ! isset( $attribute['name'] ) ) { continue; @@ -1925,6 +1925,7 @@ class WC_API_Products extends WC_API_Resource { continue; } + $taxonomy = 0; $_attribute = array(); if ( isset( $attribute['slug'] ) ) { diff --git a/includes/api/v2/class-wc-api-products.php b/includes/api/v2/class-wc-api-products.php index e8ef56ce9f3..ca622a12b3c 100644 --- a/includes/api/v2/class-wc-api-products.php +++ b/includes/api/v2/class-wc-api-products.php @@ -845,8 +845,8 @@ class WC_API_Products extends WC_API_Resource { $attributes = array(); foreach ( $data['attributes'] as $attribute ) { - $is_taxonomy = 0; - $taxonomy = 0; + $is_taxonomy = 0; + $taxonomy = 0; if ( ! isset( $attribute['name'] ) ) { continue; @@ -1462,6 +1462,7 @@ class WC_API_Products extends WC_API_Resource { continue; } + $taxonomy = 0; $_attribute = array(); if ( isset( $attribute['slug'] ) ) {