mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
downgrade plugin to php 7.0
This commit is contained in:
parent
5e011b4f95
commit
c5899d915c
61 changed files with 419 additions and 368 deletions
|
@ -19,11 +19,11 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
return array(
|
||||
|
||||
'api.merchant_email' => static function ( ContainerInterface $container ): string {
|
||||
'api.merchant_email' => static function ( $container ): string {
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
return $settings->has( 'merchant_email' ) ? (string) $settings->get( 'merchant_email' ) : '';
|
||||
},
|
||||
'api.merchant_id' => static function ( ContainerInterface $container ): string {
|
||||
'api.merchant_id' => static function ( $container ): string {
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
return $settings->has( 'merchant_id' ) ? (string) $settings->get( 'merchant_id' ) : '';
|
||||
},
|
||||
|
@ -31,20 +31,20 @@ return array(
|
|||
// @ToDo: Replace with the real merchant id of platform
|
||||
return 'KQ8FCM66JFGDL';
|
||||
},
|
||||
'api.key' => static function ( ContainerInterface $container ): string {
|
||||
'api.key' => static function ( $container ): string {
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
$key = $settings->has( 'client_id' ) ? (string) $settings->get( 'client_id' ) : '';
|
||||
return $key;
|
||||
},
|
||||
'api.secret' => static function ( ContainerInterface $container ): string {
|
||||
'api.secret' => static function ( $container ): string {
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
return $settings->has( 'client_secret' ) ? (string) $settings->get( 'client_secret' ) : '';
|
||||
},
|
||||
'api.prefix' => static function ( ContainerInterface $container ): string {
|
||||
'api.prefix' => static function ( $container ): string {
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
return $settings->has( 'prefix' ) ? (string) $settings->get( 'prefix' ) : 'WC-';
|
||||
},
|
||||
'api.endpoint.order' => static function ( ContainerInterface $container ): OrderEndpoint {
|
||||
'api.endpoint.order' => static function ( $container ): OrderEndpoint {
|
||||
$order_factory = $container->get( 'api.factory.order' );
|
||||
$patch_collection_factory = $container->get( 'api.factory.patch-collection-factory' );
|
||||
$logger = $container->get( 'woocommerce.logger.woocommerce' );
|
||||
|
@ -77,7 +77,7 @@ return array(
|
|||
$bn_code
|
||||
);
|
||||
},
|
||||
'woocommerce.logger.woocommerce' => function ( ContainerInterface $container ): LoggerInterface {
|
||||
'woocommerce.logger.woocommerce' => function ( $container ): LoggerInterface {
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
if ( ! function_exists( 'wc_get_logger' ) || ! $settings->has( 'logging_enabled' ) || ! $settings->get( 'logging_enabled' ) ) {
|
||||
return new NullLogger();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue