From c6cb7fb1e6671d8faea65b1e95368221e8535a64 Mon Sep 17 00:00:00 2001 From: Dmitrii Fediuk Date: Mon, 8 Apr 2024 01:29:56 +0300 Subject: [PATCH] 0.7.2 --- composer.json | 4 ++-- lib/main.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 16833a3..730457c 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/portal-stripe" - ,"version": "0.7.1" + ,"version": "0.7.2" ,"description": "The stripe.mage2.pro website" ,"type": "magento2-module" ,"homepage": "https://stripe.mage2.pro" @@ -12,7 +12,7 @@ "role": "Developer" }] ,"require": { - "mage2pro/core": ">=10.8.2" + "mage2pro/core": ">=10.8.3" ,"mage2pro/flag": ">=1.0.5" ,"mage2pro/oro": ">=1.1.0" ,"mage2pro/portal": ">=0.4.3" diff --git a/lib/main.php b/lib/main.php index 137d6d0..432abc7 100644 --- a/lib/main.php +++ b/lib/main.php @@ -9,13 +9,13 @@ function dfe_portal_stripe_customers():array {return df_cache_get_simple(__FUNCT $a['id'], dfa_deep($a, 'relationships/country/data/id') ];}, df_oro_get_list('customers')['data']); /** @var array(string => string) $customers */ return array_values(df_map( - df_sort_l( + df_sort( array_filter( df_oro_get_list('orders', ['product' => 1], ['website'])['included'] ,function(array $a):bool {return 'extenddfwebsites' === $a['type'] && 'magento_2' === dfa_deep($a, 'relationships/platform/data/id') ;} - ), '', function(array $a):string {return dfa_deep($a, 'attributes/domain');} + ), function(array $a):string {return dfa_deep($a, 'attributes/domain');}, true ), function(array $a) use($customers):array {$at = $a['attributes']; return [ # 2017-07-13 From now on, country can be defined not only for a customer, but for a website too. 'country' => dfa_deep($a, 'relationships/country/data/id',