Merge pull request #20000 from woocommerce/update/19983
Exclude frontend include from REST API calls
This commit is contained in:
commit
3a673aa4e9
|
@ -240,7 +240,7 @@ final class WooCommerce {
|
|||
case 'cron':
|
||||
return defined( 'DOING_CRON' );
|
||||
case 'frontend':
|
||||
return ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' );
|
||||
return ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) && ! defined( 'REST_REQUEST' );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue