wc_rest_is_from_product_editor()
Returns true if the current REST request is from the product editor.
No Hooks.
Return
true|false
.
Usage
wc_rest_is_from_product_editor();
Changelog
Since 8.9.0 | Introduced. |
wc_rest_is_from_product_editor() wc rest is from product editor code WC 9.4.2
function wc_rest_is_from_product_editor() { return isset( $_SERVER['HTTP_X_WC_FROM_PRODUCT_EDITOR'] ) && '1' === $_SERVER['HTTP_X_WC_FROM_PRODUCT_EDITOR']; }