mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Add necessary config for preview scripts
This commit is contained in:
parent
7a0350ea7a
commit
0596f84b21
4 changed files with 38 additions and 22 deletions
|
@ -31,6 +31,7 @@ use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
|||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Helper\DCCProductStatus;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Helper\PayUponInvoiceProductStatus;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Helper\SettingsStatus;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Notice\ConnectAdminNotice;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Notice\GatewayWithoutPayPalAdminNotice;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Processor\AuthorizedPaymentsProcessor;
|
||||
|
@ -154,13 +155,17 @@ class WCGatewayModule implements ModuleInterface {
|
|||
);
|
||||
|
||||
if ( $c->has( 'wcgateway.url' ) ) {
|
||||
$settings_status = $c->get( 'wcgateway.settings.status' );
|
||||
assert( $settings_status instanceof SettingsStatus );
|
||||
|
||||
$assets = new SettingsPageAssets(
|
||||
$c->get( 'wcgateway.url' ),
|
||||
$c->get( 'ppcp.asset-version' ),
|
||||
$c->get( 'subscription.helper' ),
|
||||
$c->get( 'button.client_id' ),
|
||||
$c->get( 'api.shop.currency' ),
|
||||
$c->get( 'api.shop.country' )
|
||||
$c->get( 'api.shop.country' ),
|
||||
$settings_status->is_pay_later_button_enabled()
|
||||
);
|
||||
$assets->register_assets();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue