2024-10-18 17:17:07 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The Settings module services.
|
|
|
|
*
|
|
|
|
* @package WooCommerce\PayPalCommerce\Settings
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare( strict_types = 1 );
|
|
|
|
|
|
|
|
namespace WooCommerce\PayPalCommerce\Settings;
|
|
|
|
|
|
|
|
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
2024-10-22 15:14:46 +02:00
|
|
|
use WooCommerce\PayPalCommerce\Settings\Endpoint\OnboardingRestEndpoint;
|
2024-10-18 17:17:07 +02:00
|
|
|
|
|
|
|
return array(
|
2024-10-22 15:14:46 +02:00
|
|
|
'settings.url' => static function ( ContainerInterface $container ) : string {
|
2024-10-18 17:17:07 +02:00
|
|
|
/**
|
|
|
|
* The path cannot be false.
|
|
|
|
*
|
|
|
|
* @psalm-suppress PossiblyFalseArgument
|
|
|
|
*/
|
|
|
|
return plugins_url(
|
|
|
|
'/modules/ppcp-settings/',
|
|
|
|
dirname( realpath( __FILE__ ), 3 ) . '/woocommerce-paypal-payments.php'
|
|
|
|
);
|
|
|
|
},
|
2024-10-22 15:14:46 +02:00
|
|
|
'settings.rest.onboarding' => static function ( ContainerInterface $container ) : OnboardingRestEndpoint {
|
|
|
|
return new OnboardingRestEndpoint();
|
|
|
|
},
|
2024-10-18 17:17:07 +02:00
|
|
|
);
|