Merge pull request #18073 from woocommerce/fix/18068
API: Use KSES for purchase_note like admin
This commit is contained in:
commit
5c474adf44
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue