No need to strip pa_ here

Closes #11868
This commit is contained in:
Mike Jolley 2016-09-08 12:04:46 +01:00
parent f4a30e3be6
commit 238483ff2b
1 changed files with 2 additions and 2 deletions

View File

@ -406,7 +406,7 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
} else {
$attributes[] = array(
'id' => 0,
'name' => str_replace( 'pa_', '', $name ),
'name' => $name,
'option' => $attribute,
);
}
@ -425,7 +425,7 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
} else {
$attributes[] = array(
'id' => 0,
'name' => str_replace( 'pa_', '', $attribute['name'] ),
'name' => $attribute['name'],
'position' => (int) $attribute['position'],
'visible' => (bool) $attribute['is_visible'],
'variation' => (bool) $attribute['is_variation'],