Merge pull request #849 from woocommerce/fix-onboarding-js

Load onboarding.js only in Connection tab
This commit is contained in:
Emili Castells 2022-09-15 09:21:15 +02:00 committed by GitHub
commit 1f564f8b28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,6 @@ namespace WooCommerce\PayPalCommerce\Onboarding\Assets;
use WooCommerce\PayPalCommerce\Onboarding\Endpoint\LoginSellerEndpoint;
use WooCommerce\PayPalCommerce\Onboarding\Environment;
use WooCommerce\PayPalCommerce\Onboarding\State;
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
/**
@ -173,6 +172,6 @@ class OnboardingAssets {
* @return bool
*/
private function should_render_onboarding_script(): bool {
return PayPalGateway::ID === $this->page_id || Settings::CONNECTION_TAB_ID === $this->page_id;
return Settings::CONNECTION_TAB_ID === $this->page_id;
}
}