[2.4] [API] Avoid undefined $taxonomy warnings while save variable attributes, closes #9456

This commit is contained in:
Claudio Sanches 2015-10-28 16:31:05 -02:00
parent a7028e7734
commit 4522b68a47
2 changed files with 6 additions and 4 deletions

View File

@ -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'] ) ) {

View File

@ -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'] ) ) {