diff --git a/LineItem.php b/LineItem.php index 8530f91..4baad6f 100644 --- a/LineItem.php +++ b/LineItem.php @@ -138,13 +138,10 @@ static function buildLI($type, $price, $name = null, $tangible = false, $id = nu * Опытным путём установил, что у description * такое же ограничение по длине, как и у name. * - * @param string $text + * @param string $s * @return string */ - protected static function adjustText($text) { - $text = strtr($text, ['<' => '«', '>' => '»']); - return mb_strlen($text) <= 128 ? $text : mb_substr($text, 0, 127) . '…'; - } + protected static function adjustText($s) {return df_chop(strtr($s, ['<' => '«', '>' => '»']), 128);} /** @var string */ private static $P__ID = 'id'; diff --git a/composer.json b/composer.json index bfb5e7a..d8c799d 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/2checkout" - ,"version": "1.4.8" + ,"version": "1.4.9" ,"description": "The «2Checkout» payment extension for Magento 2." ,"type": "magento2-module" ,"homepage": "https://mage2.pro/c/extensions/2checkout" @@ -11,7 +11,7 @@ "homepage": "https://mage2.pro/users/dmitry_fedyuk", "role": "Developer" }] - ,"require": {"mage2pro/core": ">=2.5.10", "2checkout/2checkout-php": "*"} + ,"require": {"mage2pro/core": ">=2.6.27", "2checkout/2checkout-php": "*"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\TwoCheckout\\": ""}} ,"keywords": [ "2Checkout"