Co-authored-by: Lee Willis <lee@ademti-software.co.uk>
This commit is contained in:
Lee Willis 2021-01-07 21:13:56 +00:00 committed by GitHub
parent b1ed75aa11
commit 6c3f30a1de
1 changed files with 3 additions and 1 deletions

View File

@ -157,7 +157,9 @@ class Products extends \WC_REST_Products_Controller {
$data->data['last_order_date'] = wc_rest_prepare_date_response( $this->last_order_dates[ $product_id ] );
}
}
$data->data['name'] = wp_strip_all_tags( $data->data['name'] );
if ( isset( $data->data['name'] ) ) {
$data->data['name'] = wp_strip_all_tags( $data->data['name'] );
}
return $data;
}