mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #442 from woocommerce/pcp-501-wp-doing-ajax
Use wp_doing_ajax instead of is_ajax
This commit is contained in:
commit
29fe7ee559
2 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ class SettingsPageAssets {
|
|||
add_action(
|
||||
'admin_enqueue_scripts',
|
||||
function() use ( $bearer ) {
|
||||
if ( ! is_admin() || is_ajax() ) {
|
||||
if ( ! is_admin() || wp_doing_ajax() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class SettingsPagesAssetsTest extends TestCase
|
|||
|
||||
when('is_admin')
|
||||
->justReturn(true);
|
||||
when('is_ajax')
|
||||
when('wp_doing_ajax')
|
||||
->justReturn(false);
|
||||
|
||||
$testee->register_assets();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue