woocommerce_prevent_admin_access
Использование
add_filter( 'woocommerce_prevent_admin_access', 'wp_kama_woocommerce_prevent_admin_access_filter' ); /** * Function for `woocommerce_prevent_admin_access` filter-hook. * * @param $prevent_access * * @return */ function wp_kama_woocommerce_prevent_admin_access_filter( $prevent_access ){ // filter... return $prevent_access; }
- $prevent_access
- -
Где вызывается хук
woocommerce_prevent_admin_access
woocommerce/includes/admin/class-wc-admin.php 181
if ( apply_filters( 'woocommerce_prevent_admin_access', $prevent_access ) ) {