Refactor the code to use the new service

This commit is contained in:
Narek Zakarian 2025-07-04 17:10:37 +04:00
parent 30b7a592c5
commit 0caa74c021
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7
21 changed files with 22 additions and 166 deletions

View file

@ -174,10 +174,7 @@ return array(
);
},
'button.url' => static function ( ContainerInterface $container ): string {
return plugins_url(
'/modules/ppcp-button/',
dirname( realpath( __FILE__ ), 3 ) . '/woocommerce-paypal-payments.php'
);
return plugins_url( '/modules/ppcp-button/', $container->get( 'ppcp.plugin-path' ) );
},
'button.pay-now-contexts' => static function ( ContainerInterface $container ): array {
$defaults = array( 'checkout', 'pay-now' );