wc_rest_is_from_product_editor()WC 8.9.0

Returns true if the current REST request is from the product editor.

No Hooks.

Returns

true|false.

Usage

wc_rest_is_from_product_editor();

Changelog

Since 8.9.0 Introduced.

wc_rest_is_from_product_editor() code WC 10.4.3

function wc_rest_is_from_product_editor() {
	return isset( $_SERVER['HTTP_X_WC_FROM_PRODUCT_EDITOR'] ) && '1' === $_SERVER['HTTP_X_WC_FROM_PRODUCT_EDITOR'];
}