WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Купить персональные IPV4 и IPV6 прокси
фильтр не описан

woocommerce_rest_check_permissions хук-фильтр . WC 1.0

Использование

add_filter( 'woocommerce_rest_check_permissions', 'filter_function_name_7136', 10, 4 );
function filter_function_name_7136( $permission, $context, $object_id, $post_type ){
	// filter...

	return $permission;
}
$permission
-
$context
-
$object_id
-
$post_type
-

Где вызывается хук

wc_rest_check_post_permissions()
woocommerce_rest_check_permissions
wc_rest_check_user_permissions()
woocommerce_rest_check_permissions
wc_rest_check_product_term_permissions()
woocommerce_rest_check_permissions
wc_rest_check_manager_permissions()
woocommerce_rest_check_permissions
wc_rest_check_product_reviews_permissions()
woocommerce_rest_check_permissions
woocommerce/includes/wc-rest-functions.php 240
return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, $post_type );
woocommerce/includes/wc-rest-functions.php 278
return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, 'user' );
woocommerce/includes/wc-rest-functions.php 303
return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, $taxonomy );
woocommerce/includes/wc-rest-functions.php 327
return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, 0, $object );
woocommerce/includes/wc-rest-functions.php 352
return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, 'product_review' );

Где используется хук (в ядре WC)

packages/woocommerce-blocks/src/RestApi/Controllers/Products.php 124
add_filter( 'woocommerce_rest_check_permissions', array( $this, 'change_permissions' ) );
packages/woocommerce-blocks/src/RestApi/Controllers/Products.php 126
remove_filter( 'woocommerce_rest_check_permissions', array( $this, 'change_permissions' ) );