Merge pull request #18073 from woocommerce/fix/18068

API: Use KSES for purchase_note like admin
This commit is contained in:
Mike Jolley 2017-12-08 12:50:57 +00:00 committed by GitHub
commit 5c474adf44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -745,7 +745,7 @@ class WC_REST_Products_Controller extends WC_REST_Legacy_Products_Controller {
// Purchase Note.
if ( isset( $request['purchase_note'] ) ) {
$product->set_purchase_note( wc_clean( $request['purchase_note'] ) );
$product->set_purchase_note( wp_kses_post( wp_unslash( $request['purchase_note'] ) ) );
}
// Featured Product.

View File

@ -1097,7 +1097,7 @@ class WC_REST_Products_V1_Controller extends WC_REST_Posts_Controller {
// Purchase Note.
if ( isset( $request['purchase_note'] ) ) {
$product->set_purchase_note( wc_clean( $request['purchase_note'] ) );
$product->set_purchase_note( wp_kses_post( wp_unslash( $request['purchase_note'] ) ) );
}
// Featured Product.