auto-patch 638-dev-dev01-2024-05-14T20_44_36
This commit is contained in:
@@ -363,3 +363,13 @@ function wc_rest_check_product_reviews_permissions( $context = 'read', $object_i
|
||||
|
||||
return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, 'product_review' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the current REST request is from the product editor.
|
||||
*
|
||||
* @since 8.9.0
|
||||
* @return bool
|
||||
*/
|
||||
function wc_rest_is_from_product_editor() {
|
||||
return isset( $_SERVER['HTTP_X_WC_FROM_PRODUCT_EDITOR'] ) && '1' === $_SERVER['HTTP_X_WC_FROM_PRODUCT_EDITOR'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user