[2.6] [REST API] Fixed the type of the params from _product_attributes, closes #11200
This commit is contained in:
parent
5a401236af
commit
43b4d1e5eb
|
@ -1012,10 +1012,10 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
|
|||
$attributes[ $attribute_name ] = array(
|
||||
'name' => $attribute_name,
|
||||
'value' => '',
|
||||
'position' => isset( $attribute['position'] ) ? absint( $attribute['position'] ) : 0,
|
||||
'position' => isset( $attribute['position'] ) ? (string) absint( $attribute['position'] ) : '0',
|
||||
'is_visible' => ( isset( $attribute['visible'] ) && $attribute['visible'] ) ? 1 : 0,
|
||||
'is_variation' => ( isset( $attribute['variation'] ) && $attribute['variation'] ) ? 1 : 0,
|
||||
'is_taxonomy' => true,
|
||||
'is_taxonomy' => 1,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1033,10 +1033,10 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
|
|||
$attributes[ sanitize_title( $attribute_name ) ] = array(
|
||||
'name' => $attribute_name,
|
||||
'value' => $values,
|
||||
'position' => isset( $attribute['position'] ) ? absint( $attribute['position'] ) : 0,
|
||||
'position' => isset( $attribute['position'] ) ? (string) absint( $attribute['position'] ) : '0',
|
||||
'is_visible' => ( isset( $attribute['visible'] ) && $attribute['visible'] ) ? 1 : 0,
|
||||
'is_variation' => ( isset( $attribute['variation'] ) && $attribute['variation'] ) ? 1 : 0,
|
||||
'is_taxonomy' => false,
|
||||
'is_taxonomy' => 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue