downgrade plugin to php 7.0

This commit is contained in:
David Remer 2020-09-11 13:38:02 +03:00
parent 5e011b4f95
commit c5899d915c
61 changed files with 419 additions and 368 deletions

View file

@ -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();