Skip to content

Commit

Permalink
https://github.com/mage2pro/core/issues/325
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Aug 6, 2023
1 parent 214a73a commit 9dd0e7c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Plugin/Framework/Pricing/Render/Amount.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Dfe\CurrencyFormat\Plugin\Framework\Pricing\Render;
use Dfe\CurrencyFormat\O as CFO;
use Dfe\CurrencyFormat\Settings;
use Magento\Framework\Pricing\PriceCurrencyInterface as IPriceCurrency;
use Magento\Framework\Pricing\Render\Amount as Sb;
# 2015-12-13
# Хитрая идея, которая уже давно пришла мне в голову: наследуясь от модифицируемого класса,
Expand Down Expand Up @@ -46,7 +47,14 @@ function __construct() {}
* и мы не знаем: опустил ли программист параметр или нет.
* @param int|null $precision [optional]
*/
function beforeFormatCurrency(Sb $sb, float $a, bool $includeContainer = true, $precision = null):array {
function beforeFormatCurrency(
Sb $sb, float $a, bool $includeContainer = true
# 2023-08-06
# 1) "Declare optional argument values for intercepted methods": https://github.com/mage2pro/core/issues/325
# 2) "Magento does not pass the values of missed optional arguments of intercepted methods to plugins":
# https://mage2.pro/t/6378
,$precision = IPriceCurrency::DEFAULT_PRECISION
):array {
/**
# 2015-12-31
# Сюда мы попадаем из шаблона https://github.com/magento/magento2/blob/2.0.0/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml
Expand Down

0 comments on commit 9dd0e7c

Please sign in to comment.