From addcf99642e6779fdb984c338aa0bdee5af875ca Mon Sep 17 00:00:00 2001 From: Ivan Chaplygin Date: Wed, 30 Aug 2023 10:18:35 +0300 Subject: [PATCH] =?UTF-8?q?ref=20#89649=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=82=D0=B5=D0=BA=D1=81=D1=82=20=D1=83=D0=B2?= =?UTF-8?q?=D0=B5=D0=B4=D0=BE=D0=BC=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=98?= =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=20=D0=BC=D0=B5=D1=82=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B8?= =?UTF-8?q?=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B8=20=D0=BA=D1=83=D0=BF?= =?UTF-8?q?=D0=BE=D0=BD=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/pot/retailcrm-ru_RU.pot | 2 +- .../class-wc-retailcrm-abstracts-settings.php | 2 +- src/include/class-wc-retailcrm-history.php | 2 +- src/languages/retailcrm-ru_RU.mo | Bin 15654 -> 15778 bytes 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/pot/retailcrm-ru_RU.pot b/resources/pot/retailcrm-ru_RU.pot index 178491e..ae63783 100644 --- a/resources/pot/retailcrm-ru_RU.pot +++ b/resources/pot/retailcrm-ru_RU.pot @@ -140,7 +140,7 @@ msgid "When working with coupons through CRM, it is impossible to transfer manua msgstr "При работе с купонами через CRM, невозможно передавать ручные скидки." msgid "The custom field must be in the form of a string or text. An example of filling in a field in CRM: `code_coupon` or `code_coupon1; code_coupon2`" -msgstr "Пользовательское поле должно быть формата string или text. Пример заполнения поля в CRM при использовании нескольких купонов: code_coupon_1; code_coupon_2" +msgstr "Пользовательское поле должно быть формата string или text. При использовании нескольких купонов, поддреживается разделение пробельными символами, а также знаками `;` `,`. Пример: code_coupon_1; code_coupon_2, code_coupon_3 code_coupon_4" msgid "Payment types" msgstr "Способы оплаты" diff --git a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php index d6f14a9..f9d7b2d 100644 --- a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php +++ b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php @@ -363,7 +363,7 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration $this->form_fields['coupon_notification'] = [ 'id' => 'coupon_options', - 'css' => 'max-width:400px;resize: none;height:150px;', + 'css' => 'max-width:400px;resize: none;height:200px;', 'type' => 'textarea', 'title' => __('Attention!', 'retailcrm'), 'value' => '', diff --git a/src/include/class-wc-retailcrm-history.php b/src/include/class-wc-retailcrm-history.php index 30cb14b..dc57419 100644 --- a/src/include/class-wc-retailcrm-history.php +++ b/src/include/class-wc-retailcrm-history.php @@ -1054,7 +1054,7 @@ if (!class_exists('WC_Retailcrm_History')) : } if (!empty($orderHistory['customFields'][$couponField])) { - $masCoupons = explode('; ', $orderHistory['customFields'][$couponField]); + $masCoupons = preg_split("/[\s,;]+/", $orderHistory['customFields'][$couponField]); foreach (array_diff($masCoupons, $wcOrderCoupons) as $coupon) { $wcOrder->apply_coupon($coupon); diff --git a/src/languages/retailcrm-ru_RU.mo b/src/languages/retailcrm-ru_RU.mo index 6406c892e53d5b7c8b37d7b1d24c686bb3f1e0bf..b46f5b1ba7f2c1db8b296025df6103a1fdf381f7 100644 GIT binary patch delta 530 zcmY+E(O7(R!8HY2vv!3ObQNJ zT0w*iZkDsjHK8WyVh6Y9?I`*WICkvR?`vHgj?X>6_nzl{?)YPQD>(1Wtv?WH^F%Tt zviV$O1*=FTPhN<)_y&h@2aEU>^OzbF>BR;P;3c-^5`QT&g>Ug4e#Q~}gHJJ;5}CtU9Kr+K#tXC;zfQ9>Kem7|>Jx@O!up-R z(B{80(<1%6ToZI)`^0}^XgBOayI2w*<2*h?|E?}zg!)S*8ht-lI`k%UuA@J-rB$t( zT@CfS*7chP8k#+mH~S7@pf!#|J>zL|9MVDD(o-9nPues^ZD`#wc}^R&xA-=&5yJz= z>{0w+GL1DR*y8ro@zZ{{6ia=PO=9;KcE!&5RSi(+6i-hetLUBqyi4C)5m zc)2bLXJIk@t|+6yAE7MXKc3;&>-+f(zwfuUf4$du?k;~zisvOCe{dVUg2bpR%-|bN zVr*JE!6`h#Hl}c4MjFQrjAI4+@f3%!hD-Q@1L$~CAC7n`|1By~*hRZ&54pquKX4rf zi&73tIEr-)(O?$Sv(f>EXcxcYN=*919&(OPd(n?vM%%CXi_$Q|CPfz>N1ma*@B-~& zb#(9@$M7r4&b*W$r<%#+)