Show notice only on ppcp and payments page

This commit is contained in:
Alex P 2021-09-01 16:28:17 +03:00
parent 9408d1a9e5
commit 34ae2ee30b
2 changed files with 30 additions and 4 deletions

View file

@ -143,7 +143,9 @@ return array(
'wcgateway.notice.dcc-without-paypal' => static function ( $container ): DccWithoutPayPalAdminNotice {
$state = $container->get( 'onboarding.state' );
$settings = $container->get( 'wcgateway.settings' );
return new DccWithoutPayPalAdminNotice( $state, $settings );
$is_payments_page = $container->get( 'wcgateway.is-wc-payments-page' );
$is_ppcp_settings_page = $container->get( 'wcgateway.is-ppcp-settings-page' );
return new DccWithoutPayPalAdminNotice( $state, $settings, $is_payments_page, $is_ppcp_settings_page );
},
'wcgateway.notice.authorize-order-action' =>
static function ( $container ): AuthorizeOrderActionNotice {