File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change 22
33namespace StatamicRadPack \Shopify \Tags ;
44
5- use NumberFormatter ;
65use Shopify \Clients \Rest ;
76use Statamic \Extensions \Pagination \LengthAwarePaginator ;
87use Statamic \Facades \Entry ;
9- use Statamic \Facades \Site ;
108use Statamic \Facades \User ;
119use Statamic \Support \Arr ;
1210use Statamic \Support \Str ;
@@ -65,23 +63,10 @@ public function productPrice()
6563
6664 $ price = $ pricePluck ->sort ()->first ();
6765
68- $ payload = [
66+ $ payload = $ this -> runHooksWith ( ' product-price ' , [
6967 'currency ' => config ('shopify.currency ' ),
7068 'price ' => $ price ,
71- ];
72-
73- $ this ->runHooksWith ('shopify-price ' , $ payload );
74-
75- // try to use currency
76- if (($ currencyCode = config ('shopify.currency_code ' )) && class_exists ('NumberFormatter ' )) {
77- try {
78- $ formatter = new \NumberFormatter (Site::current ()->locale (), \NumberFormatter::CURRENCY );
79-
80- $ price = $ formatter ->formatCurrency ((float ) $ price , $ currencyCode );
81-
82- $ currencyString = '' ; // blank this as its included in price
83- } catch (\Throwable $ e ) { }
84- }
69+ ]);
8570
8671 if ($ pricePluck ->count () > 1 && $ this ->params ->get ('show_from ' ) === true ) {
8772 return __ ('shopify::messages.display_price_from ' , ['currency ' => $ payload ->currency , 'price ' => $ payload ->price ]);
You can’t perform that action at this time.
0 commit comments