Version Description
Download this release
Release Info
Developer | mercadopago |
Plugin | WooCommerce MercadoPago |
Version | 4.0.8 |
Comparing to | |
See all releases |
Code changes from version 4.0.7 to 4.0.8
- i18n/languages/woocommerce-mercadopago-es_AR.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_AR.po +3 -3
- i18n/languages/woocommerce-mercadopago-es_CL.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_CL.po +3 -3
- i18n/languages/woocommerce-mercadopago-es_CO.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_CO.po +3 -3
- i18n/languages/woocommerce-mercadopago-es_ES.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_ES.po +3 -3
- i18n/languages/woocommerce-mercadopago-es_MX.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_MX.po +3 -3
- i18n/languages/woocommerce-mercadopago-es_PE.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_PE.po +3 -3
- i18n/languages/woocommerce-mercadopago-es_UY.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_UY.po +3 -3
- i18n/languages/woocommerce-mercadopago-es_VE.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_VE.po +3 -3
- i18n/languages/woocommerce-mercadopago-pt_BR.mo +0 -0
- i18n/languages/woocommerce-mercadopago-pt_BR.po +2 -2
- i18n/languages/woocommerce-mercadopago.pot +1 -1
- includes/admin/WC_MercadoEnvios_Admin_Orders.php +0 -1
- includes/module/WC_WooMercadoPago_Module.php +8 -15
- includes/module/config/WC_WooMercadoPago_Constants.php +1 -1
- includes/module/sdk/lib/RestClient/AbstractRestClient.php +5 -5
- includes/module/sdk/lib/RestClient/MeliRestClient.php +8 -8
- includes/module/sdk/lib/RestClient/MpRestClient.php +4 -4
- includes/notification/WC_WooMercadoPago_Notification_IPN.php +5 -3
- includes/payments/WC_WooMercadoPago_BasicGateway.php +6 -1
- includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php +22 -13
- includes/payments/mercadoenvios/WC_WooMercadoPago_Product_Recurrent.php +1 -1
- readme.txt +7 -5
- templates/checkout/custom_checkout.php +87 -92
- woocommerce-mercadopago.php +3 -5
i18n/languages/woocommerce-mercadopago-es_AR.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_AR.po
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
-
"PO-Revision-Date: 2019-09-
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
@@ -1226,7 +1226,7 @@ msgstr "En cuántas cuotas quieres pagar?"
|
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
-
msgstr "
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
+
"PO-Revision-Date: 2019-09-13 21:23-0300\n"
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
+
msgstr "Banco"
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
i18n/languages/woocommerce-mercadopago-es_CL.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_CL.po
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
-
"PO-Revision-Date: 2019-09-
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
@@ -1226,7 +1226,7 @@ msgstr "En cuántas cuotas quieres pagar?"
|
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
-
msgstr "
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
+
"PO-Revision-Date: 2019-09-13 21:23-0300\n"
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
+
msgstr "Banco"
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
i18n/languages/woocommerce-mercadopago-es_CO.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_CO.po
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
-
"PO-Revision-Date: 2019-09-
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
@@ -1226,7 +1226,7 @@ msgstr "En cuántas cuotas quieres pagar?"
|
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
-
msgstr "
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
+
"PO-Revision-Date: 2019-09-13 21:23-0300\n"
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
+
msgstr "Banco"
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
i18n/languages/woocommerce-mercadopago-es_ES.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_ES.po
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
-
"PO-Revision-Date: 2019-09-
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
@@ -1226,7 +1226,7 @@ msgstr "En cuántas cuotas quieres pagar?"
|
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
-
msgstr "
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
+
"PO-Revision-Date: 2019-09-13 21:22-0300\n"
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
+
msgstr "Banco"
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
i18n/languages/woocommerce-mercadopago-es_MX.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_MX.po
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
-
"PO-Revision-Date: 2019-09-
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
@@ -1226,7 +1226,7 @@ msgstr "En cuántas cuotas quieres pagar?"
|
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
-
msgstr "
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
+
"PO-Revision-Date: 2019-09-13 21:22-0300\n"
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
+
msgstr "Banco"
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
i18n/languages/woocommerce-mercadopago-es_PE.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_PE.po
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
-
"PO-Revision-Date: 2019-09-
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
@@ -1226,7 +1226,7 @@ msgstr "En cuántas cuotas quieres pagar?"
|
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
-
msgstr "
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
+
"PO-Revision-Date: 2019-09-13 21:22-0300\n"
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
+
msgstr "Banco"
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
i18n/languages/woocommerce-mercadopago-es_UY.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_UY.po
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
-
"PO-Revision-Date: 2019-09-
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
@@ -1226,7 +1226,7 @@ msgstr "En cuántas cuotas quieres pagar?"
|
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
-
msgstr "
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
+
"PO-Revision-Date: 2019-09-13 21:22-0300\n"
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
+
msgstr "Banco"
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
i18n/languages/woocommerce-mercadopago-es_VE.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_VE.po
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
-
"PO-Revision-Date: 2019-09-
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
@@ -1226,7 +1226,7 @@ msgstr "En cuántas cuotas quieres pagar?"
|
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
-
msgstr "
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
+
"PO-Revision-Date: 2019-09-13 21:21-0300\n"
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
1226 |
|
1227 |
#: templates/checkout/custom_checkout.php:153
|
1228 |
msgid "Issuer"
|
1229 |
+
msgstr "Banco"
|
1230 |
|
1231 |
#: templates/checkout/custom_checkout.php:165
|
1232 |
msgid "Converted payment of"
|
i18n/languages/woocommerce-mercadopago-pt_BR.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-pt_BR.po
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
-
"PO-Revision-Date: 2019-09-
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
|
12 |
+
"PO-Revision-Date: 2019-09-13 21:19-0300\n"
|
13 |
"X-Generator: Poedit 2.2.3\n"
|
14 |
"X-Domain: woocommerce-mercadopago\n"
|
15 |
"Last-Translator: \n"
|
i18n/languages/woocommerce-mercadopago.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Mercado Pago 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
2 |
# This file is distributed under the same license as the WooCommerce Mercado Pago plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Mercado Pago 4.0.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
includes/admin/WC_MercadoEnvios_Admin_Orders.php
CHANGED
@@ -41,7 +41,6 @@ class WC_MercadoEnvios_Admin_Orders {
|
|
41 |
* @throws WC_WooMercadoPago_Exception
|
42 |
*/
|
43 |
public function metabox_content( $post ) {
|
44 |
-
|
45 |
$order = wc_get_order( $post->ID );
|
46 |
$shipment_id = ( method_exists( $order, 'get_meta' ) ) ?
|
47 |
$order->get_meta( '_mercadoenvios_shipment_id' ) :
|
41 |
* @throws WC_WooMercadoPago_Exception
|
42 |
*/
|
43 |
public function metabox_content( $post ) {
|
|
|
44 |
$order = wc_get_order( $post->ID );
|
45 |
$shipment_id = ( method_exists( $order, 'get_meta' ) ) ?
|
46 |
$order->get_meta( '_mercadoenvios_shipment_id' ) :
|
includes/module/WC_WooMercadoPago_Module.php
CHANGED
@@ -27,8 +27,7 @@ class WC_WooMercadoPago_Module extends WC_WooMercadoPago_Configs
|
|
27 |
}
|
28 |
|
29 |
$this->loadConfigs();
|
30 |
-
$this->loadLog();
|
31 |
-
$this->loadConstants();
|
32 |
$this->loadHooks();
|
33 |
$this->loadPreferences();
|
34 |
$this->loadPayments();
|
@@ -38,14 +37,16 @@ class WC_WooMercadoPago_Module extends WC_WooMercadoPago_Configs
|
|
38 |
add_filter('woocommerce_available_payment_gateways', array($this, 'filterPaymentMethodByShipping'));
|
39 |
add_filter('plugin_action_links_' . WC_MERCADOPAGO_BASENAME, array($this, 'woomercadopago_settings_link'));
|
40 |
add_filter('plugin_row_meta', array($this, 'mp_plugin_row_meta'), 10, 2);
|
41 |
-
|
42 |
-
if (is_admin()
|
|
|
43 |
$credentials = new WC_WooMercadoPago_Credentials();
|
44 |
if (!$credentials->tokenIsValid()) {
|
45 |
add_action('admin_notices', array($this, 'enablePaymentNotice'));
|
46 |
}
|
47 |
-
|
48 |
-
|
|
|
49 |
} catch (Exception $e) {
|
50 |
$log = WC_WooMercadoPago_Log::init_mercado_pago_log('WC_WooMercadoPago_Module');
|
51 |
$log->write_log('__construct: ', $e->getMessage());
|
@@ -189,15 +190,7 @@ class WC_WooMercadoPago_Module extends WC_WooMercadoPago_Configs
|
|
189 |
{
|
190 |
include_once dirname(__FILE__) . '/log/WC_WooMercadoPago_Log.php';
|
191 |
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
*
|
195 |
-
*/
|
196 |
-
public function loadConstants()
|
197 |
-
{
|
198 |
-
include_once dirname(__FILE__) . '/config/WC_WooMercadoPago_Constants.php';
|
199 |
-
}
|
200 |
-
|
201 |
/**
|
202 |
* Load Shipment Types
|
203 |
*/
|
27 |
}
|
28 |
|
29 |
$this->loadConfigs();
|
30 |
+
$this->loadLog();
|
|
|
31 |
$this->loadHooks();
|
32 |
$this->loadPreferences();
|
33 |
$this->loadPayments();
|
37 |
add_filter('woocommerce_available_payment_gateways', array($this, 'filterPaymentMethodByShipping'));
|
38 |
add_filter('plugin_action_links_' . WC_MERCADOPAGO_BASENAME, array($this, 'woomercadopago_settings_link'));
|
39 |
add_filter('plugin_row_meta', array($this, 'mp_plugin_row_meta'), 10, 2);
|
40 |
+
|
41 |
+
if (is_admin()) {
|
42 |
+
if(isset($_REQUEST['section'])){
|
43 |
$credentials = new WC_WooMercadoPago_Credentials();
|
44 |
if (!$credentials->tokenIsValid()) {
|
45 |
add_action('admin_notices', array($this, 'enablePaymentNotice'));
|
46 |
}
|
47 |
+
}
|
48 |
+
self::loadMercadoEnviosAdmin();
|
49 |
+
}
|
50 |
} catch (Exception $e) {
|
51 |
$log = WC_WooMercadoPago_Log::init_mercado_pago_log('WC_WooMercadoPago_Module');
|
52 |
$log->write_log('__construct: ', $e->getMessage());
|
190 |
{
|
191 |
include_once dirname(__FILE__) . '/log/WC_WooMercadoPago_Log.php';
|
192 |
}
|
193 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
/**
|
195 |
* Load Shipment Types
|
196 |
*/
|
includes/module/config/WC_WooMercadoPago_Constants.php
CHANGED
@@ -11,7 +11,7 @@ class WC_WooMercadoPago_Constants
|
|
11 |
{
|
12 |
const PRODUCT_ID = 'BC32CPFTRPP001U8NHRG';
|
13 |
const PLATAFORM_ID = 'WooCommerce';
|
14 |
-
const VERSION = '4.0.
|
15 |
const MIN_PHP = 5.6;
|
16 |
const API_MP_BASE_URL = 'https://api.mercadopago.com';
|
17 |
}
|
11 |
{
|
12 |
const PRODUCT_ID = 'BC32CPFTRPP001U8NHRG';
|
13 |
const PLATAFORM_ID = 'WooCommerce';
|
14 |
+
const VERSION = '4.0.8';
|
15 |
const MIN_PHP = 5.6;
|
16 |
const API_MP_BASE_URL = 'https://api.mercadopago.com';
|
17 |
}
|
includes/module/sdk/lib/RestClient/AbstractRestClient.php
CHANGED
@@ -14,9 +14,9 @@ class AbstractRestClient
|
|
14 |
* @return array|null
|
15 |
* @throws WC_WooMercadoPago_Exception
|
16 |
*/
|
17 |
-
public static function execAbs($request)
|
18 |
{
|
19 |
-
$connect = self::build_request($request);
|
20 |
|
21 |
return self::execute($request, $connect);
|
22 |
}
|
@@ -26,7 +26,7 @@ class AbstractRestClient
|
|
26 |
* @return false|resource
|
27 |
* @throws WC_WooMercadoPago_Exception
|
28 |
*/
|
29 |
-
public static function build_request($request)
|
30 |
{
|
31 |
if (!extension_loaded('curl')) {
|
32 |
throw new WC_WooMercadoPago_Exception('cURL extension not found. You need to enable cURL in your php.ini or another configuration you have.');
|
@@ -81,7 +81,7 @@ class AbstractRestClient
|
|
81 |
}
|
82 |
}
|
83 |
|
84 |
-
curl_setopt($connect, CURLOPT_URL,
|
85 |
|
86 |
|
87 |
if (isset($request['data'])) {
|
@@ -189,7 +189,7 @@ class AbstractRestClient
|
|
189 |
'uri' => '/modules/log',
|
190 |
'data' => $data
|
191 |
);
|
192 |
-
$result_response = MeLiRestClient::post($request
|
193 |
return $result_response;
|
194 |
}
|
195 |
|
14 |
* @return array|null
|
15 |
* @throws WC_WooMercadoPago_Exception
|
16 |
*/
|
17 |
+
public static function execAbs($request, $url)
|
18 |
{
|
19 |
+
$connect = self::build_request($request, $url);
|
20 |
|
21 |
return self::execute($request, $connect);
|
22 |
}
|
26 |
* @return false|resource
|
27 |
* @throws WC_WooMercadoPago_Exception
|
28 |
*/
|
29 |
+
public static function build_request($request, $url)
|
30 |
{
|
31 |
if (!extension_loaded('curl')) {
|
32 |
throw new WC_WooMercadoPago_Exception('cURL extension not found. You need to enable cURL in your php.ini or another configuration you have.');
|
81 |
}
|
82 |
}
|
83 |
|
84 |
+
curl_setopt($connect, CURLOPT_URL, $url . $request['uri']);
|
85 |
|
86 |
|
87 |
if (isset($request['data'])) {
|
189 |
'uri' => '/modules/log',
|
190 |
'data' => $data
|
191 |
);
|
192 |
+
$result_response = MeLiRestClient::post($request);
|
193 |
return $result_response;
|
194 |
}
|
195 |
|
includes/module/sdk/lib/RestClient/MeliRestClient.php
CHANGED
@@ -12,10 +12,10 @@ class MeliRestClient extends AbstractRestClient
|
|
12 |
* @return array|null
|
13 |
* @throws WC_WooMercadoPago_Exception
|
14 |
*/
|
15 |
-
public static function get($request
|
16 |
{
|
17 |
$request['method'] = 'GET';
|
18 |
-
return self::execAbs($request,
|
19 |
}
|
20 |
|
21 |
/**
|
@@ -24,10 +24,10 @@ class MeliRestClient extends AbstractRestClient
|
|
24 |
* @return array|null
|
25 |
* @throws WC_WooMercadoPago_Exception
|
26 |
*/
|
27 |
-
public static function post($request
|
28 |
{
|
29 |
$request['method'] = 'POST';
|
30 |
-
return self::execAbs($request,
|
31 |
}
|
32 |
|
33 |
/**
|
@@ -36,10 +36,10 @@ class MeliRestClient extends AbstractRestClient
|
|
36 |
* @return array|null
|
37 |
* @throws WC_WooMercadoPago_Exception
|
38 |
*/
|
39 |
-
public static function put($request
|
40 |
{
|
41 |
$request['method'] = 'PUT';
|
42 |
-
return self::execAbs($request,
|
43 |
}
|
44 |
|
45 |
/**
|
@@ -48,9 +48,9 @@ class MeliRestClient extends AbstractRestClient
|
|
48 |
* @return array|null
|
49 |
* @throws WC_WooMercadoPago_Exception
|
50 |
*/
|
51 |
-
public static function delete($request
|
52 |
{
|
53 |
$request['method'] = 'DELETE';
|
54 |
-
return self::execAbs($request,
|
55 |
}
|
56 |
}
|
12 |
* @return array|null
|
13 |
* @throws WC_WooMercadoPago_Exception
|
14 |
*/
|
15 |
+
public static function get($request)
|
16 |
{
|
17 |
$request['method'] = 'GET';
|
18 |
+
return self::execAbs($request, self::API_MELI_BASE_URL);
|
19 |
}
|
20 |
|
21 |
/**
|
24 |
* @return array|null
|
25 |
* @throws WC_WooMercadoPago_Exception
|
26 |
*/
|
27 |
+
public static function post($request)
|
28 |
{
|
29 |
$request['method'] = 'POST';
|
30 |
+
return self::execAbs($request, self::API_MELI_BASE_URL);
|
31 |
}
|
32 |
|
33 |
/**
|
36 |
* @return array|null
|
37 |
* @throws WC_WooMercadoPago_Exception
|
38 |
*/
|
39 |
+
public static function put($request)
|
40 |
{
|
41 |
$request['method'] = 'PUT';
|
42 |
+
return self::execAbs($request, self::API_MELI_BASE_URL);
|
43 |
}
|
44 |
|
45 |
/**
|
48 |
* @return array|null
|
49 |
* @throws WC_WooMercadoPago_Exception
|
50 |
*/
|
51 |
+
public static function delete($request)
|
52 |
{
|
53 |
$request['method'] = 'DELETE';
|
54 |
+
return self::execAbs($request, self::API_MELI_BASE_URL);
|
55 |
}
|
56 |
}
|
includes/module/sdk/lib/RestClient/MpRestClient.php
CHANGED
@@ -13,7 +13,7 @@ class MPRestClient extends AbstractRestClient
|
|
13 |
public static function get($request)
|
14 |
{
|
15 |
$request['method'] = 'GET';
|
16 |
-
return self::execAbs($request);
|
17 |
}
|
18 |
|
19 |
/**
|
@@ -24,7 +24,7 @@ class MPRestClient extends AbstractRestClient
|
|
24 |
public static function post($request)
|
25 |
{
|
26 |
$request['method'] = 'POST';
|
27 |
-
return self::execAbs($request);
|
28 |
}
|
29 |
|
30 |
/**
|
@@ -35,7 +35,7 @@ class MPRestClient extends AbstractRestClient
|
|
35 |
public static function put($request)
|
36 |
{
|
37 |
$request['method'] = 'PUT';
|
38 |
-
return self::execAbs($request);
|
39 |
}
|
40 |
|
41 |
/**
|
@@ -46,7 +46,7 @@ class MPRestClient extends AbstractRestClient
|
|
46 |
public static function delete($request)
|
47 |
{
|
48 |
$request['method'] = 'DELETE';
|
49 |
-
return self::execAbs($request);
|
50 |
}
|
51 |
|
52 |
}
|
13 |
public static function get($request)
|
14 |
{
|
15 |
$request['method'] = 'GET';
|
16 |
+
return self::execAbs($request, WC_WooMercadoPago_Constants::API_MP_BASE_URL);
|
17 |
}
|
18 |
|
19 |
/**
|
24 |
public static function post($request)
|
25 |
{
|
26 |
$request['method'] = 'POST';
|
27 |
+
return self::execAbs($request, WC_WooMercadoPago_Constants::API_MP_BASE_URL);
|
28 |
}
|
29 |
|
30 |
/**
|
35 |
public static function put($request)
|
36 |
{
|
37 |
$request['method'] = 'PUT';
|
38 |
+
return self::execAbs($request, WC_WooMercadoPago_Constants::API_MP_BASE_URL);
|
39 |
}
|
40 |
|
41 |
/**
|
46 |
public static function delete($request)
|
47 |
{
|
48 |
$request['method'] = 'DELETE';
|
49 |
+
return self::execAbs($request, WC_WooMercadoPago_Constants::API_MP_BASE_URL);
|
50 |
}
|
51 |
|
52 |
}
|
includes/notification/WC_WooMercadoPago_Notification_IPN.php
CHANGED
@@ -232,9 +232,11 @@ class WC_WooMercadoPago_Notification_IPN extends WC_WooMercadoPago_Notification_
|
|
232 |
'access_token' => $access_token
|
233 |
)
|
234 |
);
|
|
|
235 |
$email = (wp_get_current_user()->ID != 0) ? wp_get_current_user()->user_email : null;
|
236 |
MeliRestClient::set_email($email);
|
237 |
-
$shipments_data = MeliRestClient::get($request
|
|
|
238 |
switch ($shipments_data['response']['substatus']) {
|
239 |
case 'ready_to_print':
|
240 |
$substatus_description = __('Label ready to print', 'woocommerce-mercadopago');
|
@@ -277,9 +279,9 @@ class WC_WooMercadoPago_Notification_IPN extends WC_WooMercadoPago_Notification_
|
|
277 |
foreach ($items as $item) {
|
278 |
$product = new WC_product($item['product_id']);
|
279 |
if (method_exists($product, 'get_description')) {
|
280 |
-
$product_title =
|
281 |
} else {
|
282 |
-
$product_title =
|
283 |
}
|
284 |
array_push($list_of_items, $product_title . ' x ' . $item['qty']);
|
285 |
}
|
232 |
'access_token' => $access_token
|
233 |
)
|
234 |
);
|
235 |
+
|
236 |
$email = (wp_get_current_user()->ID != 0) ? wp_get_current_user()->user_email : null;
|
237 |
MeliRestClient::set_email($email);
|
238 |
+
$shipments_data = MeliRestClient::get($request);
|
239 |
+
|
240 |
switch ($shipments_data['response']['substatus']) {
|
241 |
case 'ready_to_print':
|
242 |
$substatus_description = __('Label ready to print', 'woocommerce-mercadopago');
|
279 |
foreach ($items as $item) {
|
280 |
$product = new WC_product($item['product_id']);
|
281 |
if (method_exists($product, 'get_description')) {
|
282 |
+
$product_title = $product->get_name();
|
283 |
} else {
|
284 |
+
$product_title = $product->post->post_title;
|
285 |
}
|
286 |
array_push($list_of_items, $product_title . ' x ' . $item['qty']);
|
287 |
}
|
includes/payments/WC_WooMercadoPago_BasicGateway.php
CHANGED
@@ -179,7 +179,7 @@ class WC_WooMercadoPago_BasicGateway extends WC_WooMercadoPago_PaymentAbstract
|
|
179 |
return true;
|
180 |
}
|
181 |
|
182 |
-
if ($this->settings['enabled'] == 'yes') {
|
183 |
if ($this->mp instanceof MP) {
|
184 |
$accessToken = $this->mp->get_access_token();
|
185 |
if (strpos($accessToken, 'APP_USR') === false && strpos($accessToken, 'TEST') === false) {
|
@@ -397,6 +397,11 @@ class WC_WooMercadoPago_BasicGateway extends WC_WooMercadoPago_PaymentAbstract
|
|
397 |
$ex_payments_sort = array();
|
398 |
|
399 |
$all_payments = get_option('_checkout_payments_methods', '');
|
|
|
|
|
|
|
|
|
|
|
400 |
$get_payment_methods = get_option('_all_payment_methods_v0', '');
|
401 |
|
402 |
if (!empty($get_payment_methods)) {
|
179 |
return true;
|
180 |
}
|
181 |
|
182 |
+
if (isset($this->settings['enabled']) && $this->settings['enabled'] == 'yes') {
|
183 |
if ($this->mp instanceof MP) {
|
184 |
$accessToken = $this->mp->get_access_token();
|
185 |
if (strpos($accessToken, 'APP_USR') === false && strpos($accessToken, 'TEST') === false) {
|
397 |
$ex_payments_sort = array();
|
398 |
|
399 |
$all_payments = get_option('_checkout_payments_methods', '');
|
400 |
+
|
401 |
+
if (empty($all_payments)) {
|
402 |
+
return $ex_payments;
|
403 |
+
}
|
404 |
+
|
405 |
$get_payment_methods = get_option('_all_payment_methods_v0', '');
|
406 |
|
407 |
if (!empty($get_payment_methods)) {
|
includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php
CHANGED
@@ -110,6 +110,14 @@ abstract class WC_WooMercadoPago_Hook_Abstract
|
|
110 |
*/
|
111 |
public function get_payment_method_title($title, $id)
|
112 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
if (!is_checkout() && !(defined('DOING_AJAX') && DOING_AJAX)) {
|
114 |
return $title;
|
115 |
}
|
@@ -119,9 +127,11 @@ abstract class WC_WooMercadoPago_Hook_Abstract
|
|
119 |
if (!is_numeric($this->payment->gateway_discount) || $this->payment->commission > 99 || $this->payment->gateway_discount > 99) {
|
120 |
return $title;
|
121 |
}
|
122 |
-
|
|
|
123 |
$price_discount = $total * ($this->payment->gateway_discount / 100);
|
124 |
$price_commission = $total * ($this->payment->commission / 100);
|
|
|
125 |
if ($this->payment->gateway_discount > 0 && $this->payment->commission > 0) {
|
126 |
$title .= ' (' . __('Discount of', 'woocommerce-mercadopago') . ' ' . strip_tags(wc_price($price_discount)) . __(' and Rate of', 'woocommerce-mercadopago') . ' ' . strip_tags(wc_price($price_commission)) . ')';
|
127 |
} elseif ($this->payment->gateway_discount > 0) {
|
@@ -163,15 +173,15 @@ abstract class WC_WooMercadoPago_Hook_Abstract
|
|
163 |
if (!empty($this->publicKey) && !$this->testUser) {
|
164 |
// $this->payment->log->write_log(__FUNCTION__, 'updating order of ID ' . $order_id);
|
165 |
// return '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
// MA.setPublicKey(' . $this->publicKey . ');
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
}
|
176 |
}
|
177 |
|
@@ -301,14 +311,13 @@ abstract class WC_WooMercadoPago_Hook_Abstract
|
|
301 |
if ($key == '_mp_access_token_prod') {
|
302 |
$homolog_validate = $this->mpInstance->homologValidate($value);
|
303 |
update_option('homolog_validate', $homolog_validate, true);
|
304 |
-
if($isProduction == 'yes' && $homolog_validate == 0) {
|
305 |
add_action('admin_notices', array(get_class($this->payment), 'enablePaymentNotice'));
|
306 |
}
|
307 |
}
|
308 |
|
309 |
if (
|
310 |
-
($key == '_mp_access_token_prod' && $isProduction == 'yes') ||
|
311 |
-
($key == '_mp_access_token_test' && $isProduction == 'no')
|
312 |
) {
|
313 |
WC_WooMercadoPago_Credentials::updatePaymentMethods($this->mpInstance, $value);
|
314 |
WC_WooMercadoPago_Credentials::updateTicketMethod($this->mpInstance, $value);
|
@@ -335,7 +344,7 @@ abstract class WC_WooMercadoPago_Hook_Abstract
|
|
335 |
public function noticeInvalidProdCredentials()
|
336 |
{
|
337 |
echo '<div class="error is-dismissible">
|
338 |
-
<p><strong>MERCADO PAGO: </strong>'. __('Credentials for invalid production!', 'woocommerce-mercadopago') . '</p>
|
339 |
</div>';
|
340 |
}
|
341 |
|
110 |
*/
|
111 |
public function get_payment_method_title($title, $id)
|
112 |
{
|
113 |
+
if (!preg_match('/woo-mercado-pago/', $id)) {
|
114 |
+
return $title;
|
115 |
+
}
|
116 |
+
|
117 |
+
if ($id != $this->payment->id) {
|
118 |
+
return $title;
|
119 |
+
}
|
120 |
+
|
121 |
if (!is_checkout() && !(defined('DOING_AJAX') && DOING_AJAX)) {
|
122 |
return $title;
|
123 |
}
|
127 |
if (!is_numeric($this->payment->gateway_discount) || $this->payment->commission > 99 || $this->payment->gateway_discount > 99) {
|
128 |
return $title;
|
129 |
}
|
130 |
+
|
131 |
+
$total = (float) WC()->cart->subtotal;
|
132 |
$price_discount = $total * ($this->payment->gateway_discount / 100);
|
133 |
$price_commission = $total * ($this->payment->commission / 100);
|
134 |
+
|
135 |
if ($this->payment->gateway_discount > 0 && $this->payment->commission > 0) {
|
136 |
$title .= ' (' . __('Discount of', 'woocommerce-mercadopago') . ' ' . strip_tags(wc_price($price_discount)) . __(' and Rate of', 'woocommerce-mercadopago') . ' ' . strip_tags(wc_price($price_commission)) . ')';
|
137 |
} elseif ($this->payment->gateway_discount > 0) {
|
173 |
if (!empty($this->publicKey) && !$this->testUser) {
|
174 |
// $this->payment->log->write_log(__FUNCTION__, 'updating order of ID ' . $order_id);
|
175 |
// return '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
176 |
+
// <script type="text/javascript">
|
177 |
+
// try {
|
178 |
+
// var MA = ModuleAnalytics;
|
179 |
// MA.setPublicKey(' . $this->publicKey . ');
|
180 |
+
// MA.setPaymentType("basic");
|
181 |
+
// MA.setCheckoutType("basic");
|
182 |
+
// MA.put();
|
183 |
+
// } catch(err) {}
|
184 |
+
// </script>';
|
185 |
}
|
186 |
}
|
187 |
|
311 |
if ($key == '_mp_access_token_prod') {
|
312 |
$homolog_validate = $this->mpInstance->homologValidate($value);
|
313 |
update_option('homolog_validate', $homolog_validate, true);
|
314 |
+
if ($isProduction == 'yes' && $homolog_validate == 0) {
|
315 |
add_action('admin_notices', array(get_class($this->payment), 'enablePaymentNotice'));
|
316 |
}
|
317 |
}
|
318 |
|
319 |
if (
|
320 |
+
($key == '_mp_access_token_prod' && $isProduction == 'yes') || ($key == '_mp_access_token_test' && $isProduction == 'no')
|
|
|
321 |
) {
|
322 |
WC_WooMercadoPago_Credentials::updatePaymentMethods($this->mpInstance, $value);
|
323 |
WC_WooMercadoPago_Credentials::updateTicketMethod($this->mpInstance, $value);
|
344 |
public function noticeInvalidProdCredentials()
|
345 |
{
|
346 |
echo '<div class="error is-dismissible">
|
347 |
+
<p><strong>MERCADO PAGO: </strong>' . __('Credentials for invalid production!', 'woocommerce-mercadopago') . '</p>
|
348 |
</div>';
|
349 |
}
|
350 |
|
includes/payments/mercadoenvios/WC_WooMercadoPago_Product_Recurrent.php
CHANGED
@@ -211,7 +211,7 @@ class WC_WooMercadoPago_Product_Recurrent
|
|
211 |
*/
|
212 |
public function mp_save_recurrent_settings($post_id)
|
213 |
{
|
214 |
-
$_mp_recurring_is_recurrent = $_POST['_mp_recurring_is_recurrent'];
|
215 |
if (!empty($_mp_recurring_is_recurrent)) {
|
216 |
update_post_meta($post_id, '_mp_recurring_is_recurrent', esc_attr($_mp_recurring_is_recurrent));
|
217 |
} else {
|
211 |
*/
|
212 |
public function mp_save_recurrent_settings($post_id)
|
213 |
{
|
214 |
+
$_mp_recurring_is_recurrent = isset($_POST['_mp_recurring_is_recurrent']) ? $_POST['_mp_recurring_is_recurrent'] : '';
|
215 |
if (!empty($_mp_recurring_is_recurrent)) {
|
216 |
update_post_meta($post_id, '_mp_recurring_is_recurrent', esc_attr($_mp_recurring_is_recurrent));
|
217 |
} else {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: ecommerce, mercadopago, woocommerce
|
|
4 |
Requires at least: 4.9.10
|
5 |
Tested up to: 5.2.2
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 4.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -112,12 +112,14 @@ Set up both the plugin and the checkouts you want to activate on your payment av
|
|
112 |
Check out our <a href="https://www.mercadopago.com.br/developers/pt/plugins_sdks/plugins/official/woo-commerce/">official documentation</a> for more information on the specific fields to configure.
|
113 |
|
114 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
= v4.0.7 (12/09/2019) =
|
117 |
-
|
118 |
-
* Feature Mercado envios
|
119 |
-
- The service Mercados envios is temporary unavailable in all versions.
|
120 |
-
|
121 |
* Bug fixes
|
122 |
- Fixed layout incompatibility
|
123 |
- Fixed process to validate card at custom checkout
|
4 |
Requires at least: 4.9.10
|
5 |
Tested up to: 5.2.2
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 4.0.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
112 |
Check out our <a href="https://www.mercadopago.com.br/developers/pt/plugins_sdks/plugins/official/woo-commerce/">official documentation</a> for more information on the specific fields to configure.
|
113 |
|
114 |
== Changelog ==
|
115 |
+
= v4.0.8 (13/09/2019) =
|
116 |
+
* Bug fixes
|
117 |
+
- Fixed mercado envios
|
118 |
+
- Fexed show fee in checkout
|
119 |
+
- Fixed translation file
|
120 |
+
- Fixed constant file
|
121 |
|
122 |
= v4.0.7 (12/09/2019) =
|
|
|
|
|
|
|
|
|
123 |
* Bug fixes
|
124 |
- Fixed layout incompatibility
|
125 |
- Fixed process to validate card at custom checkout
|
templates/checkout/custom_checkout.php
CHANGED
@@ -19,17 +19,17 @@ if (!defined('ABSPATH')) {
|
|
19 |
<div class="mp-col-md-12">
|
20 |
<div class="frame-tarjetas">
|
21 |
<?php if (count($credit_card) != 0) : ?>
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
<?php endif; ?>
|
27 |
|
28 |
<?php if (count($debit_card) != 0) : ?>
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
<?php endif; ?>
|
34 |
</div>
|
35 |
</div>
|
@@ -66,16 +66,16 @@ if (!defined('ABSPATH')) {
|
|
66 |
<select id="paymentMethodSelector" class="mp-form-control mp-pointer" name="mercadopago_custom[paymentMethodSelector]" data-checkout="cardId">
|
67 |
<optgroup label="<?= esc_html__('Your card', 'woocommerce-mercadopago'); ?>" id="payment-methods-for-customer-and-cards">
|
68 |
<?php foreach ($customer_cards as $card) : ?>
|
69 |
-
|
70 |
first_six_digits=<?= $card['first_six_digits']; ?>
|
71 |
last_four_digits=<?= $card['last_four_digits']; ?>
|
72 |
security_code_length=<?= $card['security_code']['length']; ?>
|
73 |
type_checkout='customer_and_card'
|
74 |
payment_method_id=<?= $card['payment_method']['id']; ?>">
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
<?php endforeach; ?>
|
80 |
</optgroup>
|
81 |
|
@@ -157,21 +157,21 @@ if (!defined('ABSPATH')) {
|
|
157 |
|
158 |
<div id="installments-div" class="mp-col-md-8">
|
159 |
<?php if ($currency_ratio != 1) : ?>
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
<?php else : ?>
|
174 |
-
|
175 |
<?php endif; ?>
|
176 |
|
177 |
<select class="mp-form-control mp-pointer mp-mt-5" id="installments" data-checkout="installments" name="mercadopago_custom[installments]"></select>
|
@@ -247,7 +247,6 @@ if (!defined('ABSPATH')) {
|
|
247 |
</div>
|
248 |
|
249 |
<script type="text/javascript">
|
250 |
-
|
251 |
//collapsible payments
|
252 |
var show_payments = document.querySelector("#button-show-payments")
|
253 |
var frame_payments = document.querySelector("#mp-frame-payments");
|
@@ -298,10 +297,10 @@ if (!defined('ABSPATH')) {
|
|
298 |
}
|
299 |
|
300 |
//mercadopago function
|
301 |
-
(function(
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
debug: true,
|
306 |
add_truncated_card: true,
|
307 |
site_id: "",
|
@@ -320,7 +319,7 @@ if (!defined('ABSPATH')) {
|
|
320 |
"couponCode",
|
321 |
"applyCoupon"
|
322 |
],
|
323 |
-
|
324 |
"cardNumber",
|
325 |
"cardExpirationDate",
|
326 |
"cardholderName",
|
@@ -549,10 +548,10 @@ if (!defined('ABSPATH')) {
|
|
549 |
|
550 |
var cardSelector = document.querySelector(MPv1.selectors.paymentMethodSelector);
|
551 |
|
552 |
-
// if (cardSelector && cardSelector[cardSelector.options.selectedIndex].value != "-1") {
|
553 |
-
// return cardSelector[cardSelector.options.selectedIndex]
|
554 |
-
// .getAttribute("first_six_digits");
|
555 |
-
// }
|
556 |
|
557 |
var ccNumber = document.querySelector(MPv1.selectors.cardNumber);
|
558 |
return ccNumber.value.replace(/[ .-]/g, "").slice(0, 6);
|
@@ -564,7 +563,7 @@ if (!defined('ABSPATH')) {
|
|
564 |
var bin = MPv1.getBin();
|
565 |
|
566 |
if (bin.length == 0) {
|
567 |
-
|
568 |
|
569 |
MPv1.hideIssuer();
|
570 |
|
@@ -920,12 +919,12 @@ if (!defined('ABSPATH')) {
|
|
920 |
.indexOf(element.getAttribute("data-checkout")) > -1) {
|
921 |
|
922 |
if (element.value == -1 || element.value == "") {
|
923 |
-
|
924 |
return false;
|
925 |
-
}
|
926 |
-
}
|
927 |
-
}
|
928 |
-
|
929 |
}
|
930 |
|
931 |
MPv1.createToken = function() {
|
@@ -939,7 +938,7 @@ if (!defined('ABSPATH')) {
|
|
939 |
var $form = MPv1.getForm();
|
940 |
|
941 |
Mercadopago.createToken($form, MPv1.sdkResponseHandler);
|
942 |
-
|
943 |
return false;
|
944 |
}
|
945 |
|
@@ -949,8 +948,7 @@ if (!defined('ABSPATH')) {
|
|
949 |
|
950 |
if (status != 200 && status != 201) {
|
951 |
MPv1.showErrors(response);
|
952 |
-
}
|
953 |
-
else {
|
954 |
var token = document.querySelector(MPv1.selectors.token);
|
955 |
token.value = response.id;
|
956 |
|
@@ -959,8 +957,8 @@ if (!defined('ABSPATH')) {
|
|
959 |
document.querySelector(MPv1.selectors.cardTruncated).value = card;
|
960 |
}
|
961 |
|
962 |
-
|
963 |
-
|
964 |
}
|
965 |
}
|
966 |
|
@@ -1061,9 +1059,9 @@ if (!defined('ABSPATH')) {
|
|
1061 |
}
|
1062 |
};
|
1063 |
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
MPv1.addListenerEvent(
|
1068 |
document.querySelector(MPv1.selectors.cardNumber),
|
1069 |
"keyup", MPv1.clearOptions
|
@@ -1194,7 +1192,7 @@ if (!defined('ABSPATH')) {
|
|
1194 |
}
|
1195 |
|
1196 |
if (MPv1.site_id == "MLM") {
|
1197 |
-
|
1198 |
document.querySelector(MPv1.selectors.formCustomerAndCard).removeAttribute("style");
|
1199 |
document.querySelector(MPv1.selectors.mpSecurityCodeCustomerAndCard).style.display = "none";
|
1200 |
|
@@ -1249,57 +1247,54 @@ if (!defined('ABSPATH')) {
|
|
1249 |
|
1250 |
this.MPv1 = MPv1;
|
1251 |
|
1252 |
-
|
1253 |
-
|
1254 |
-
$( 'body' ).on( 'updated_checkout', function() {
|
1255 |
-
var field = $( 'body #cardNumber' );
|
1256 |
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
|
|
|
|
|
|
|
|
1261 |
|
1262 |
// get action button submit
|
1263 |
$('form.checkout').on('checkout_place_order_woo-mercado-pago-custom', function() {
|
1264 |
-
|
1265 |
mercado_pago = false;
|
1266 |
|
1267 |
return true;
|
1268 |
}
|
1269 |
-
|
1270 |
-
if (!document.getElementById('payment_method_woo-mercado-pago-custom').checked) {
|
1271 |
-
return true;
|
1272 |
-
}
|
1273 |
|
1274 |
-
|
|
|
|
|
|
|
|
|
1275 |
return MPv1.createToken();
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
});
|
1280 |
|
1281 |
-
|
1282 |
-
|
1283 |
-
if ( mercado_pago ) {
|
1284 |
mercado_pago = false;
|
1285 |
|
1286 |
return true;
|
1287 |
}
|
1288 |
-
|
1289 |
-
if (!document.getElementById('payment_method_woo-mercado-pago-custom').checked) {
|
1290 |
-
return true;
|
1291 |
-
}
|
1292 |
|
1293 |
-
|
|
|
|
|
|
|
|
|
1294 |
return MPv1.createToken();
|
1295 |
-
}
|
1296 |
-
|
1297 |
-
return false;
|
1298 |
}
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
|
|
1303 |
|
1304 |
// Overriding this function to give form padding attribute.
|
1305 |
MPv1.setForm = function() {
|
@@ -1333,14 +1328,14 @@ if (!defined('ABSPATH')) {
|
|
1333 |
} else {
|
1334 |
var $span = $form.querySelector("#mp-error-" + error.code);
|
1335 |
}
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
}
|
1343 |
-
|
1344 |
}
|
1345 |
|
1346 |
MPv1.hideErrors = function() {
|
@@ -1358,7 +1353,7 @@ if (!defined('ABSPATH')) {
|
|
1358 |
|
1359 |
return;
|
1360 |
|
1361 |
-
}
|
1362 |
|
1363 |
/*
|
1364 |
* END Customization
|
19 |
<div class="mp-col-md-12">
|
20 |
<div class="frame-tarjetas">
|
21 |
<?php if (count($credit_card) != 0) : ?>
|
22 |
+
<p class="submp-title-checkout-custom"><?= __('Credit cards', 'woocommerce-mercadopago') ?></p>
|
23 |
+
<?php foreach ($credit_card as $credit_image) : ?>
|
24 |
+
<img src="<?= $credit_image ?>" class="mp-img-fluid mp-img-tarjetas" alt="" />
|
25 |
+
<?php endforeach; ?>
|
26 |
<?php endif; ?>
|
27 |
|
28 |
<?php if (count($debit_card) != 0) : ?>
|
29 |
+
<p class="submp-title-checkout-custom mp-pt-10"><?= __('Debit card', 'woocommerce-mercadopago') ?></p>
|
30 |
+
<?php foreach ($debit_card as $debit_image) : ?>
|
31 |
+
<img src="<?= $debit_image ?>" class="mp-img-fluid mp-img-tarjetas" alt="" />
|
32 |
+
<?php endforeach; ?>
|
33 |
<?php endif; ?>
|
34 |
</div>
|
35 |
</div>
|
66 |
<select id="paymentMethodSelector" class="mp-form-control mp-pointer" name="mercadopago_custom[paymentMethodSelector]" data-checkout="cardId">
|
67 |
<optgroup label="<?= esc_html__('Your card', 'woocommerce-mercadopago'); ?>" id="payment-methods-for-customer-and-cards">
|
68 |
<?php foreach ($customer_cards as $card) : ?>
|
69 |
+
<option value="<?= $card['id']; ?>
|
70 |
first_six_digits=<?= $card['first_six_digits']; ?>
|
71 |
last_four_digits=<?= $card['last_four_digits']; ?>
|
72 |
security_code_length=<?= $card['security_code']['length']; ?>
|
73 |
type_checkout='customer_and_card'
|
74 |
payment_method_id=<?= $card['payment_method']['id']; ?>">
|
75 |
+
<?= ucfirst($card['payment_method']['name']); ?>
|
76 |
+
<?= esc_html__('finished in', 'woocommerce-mercadopago'); ?>
|
77 |
+
<?= $card['last_four_digits']; ?>
|
78 |
+
</option>
|
79 |
<?php endforeach; ?>
|
80 |
</optgroup>
|
81 |
|
157 |
|
158 |
<div id="installments-div" class="mp-col-md-8">
|
159 |
<?php if ($currency_ratio != 1) : ?>
|
160 |
+
<label for="installments" class="mp-label-form">
|
161 |
+
<div class="mp-tooltip">
|
162 |
+
<?= esc_html__('', 'woocommerce-mercadopago'); ?>
|
163 |
+
<span class="mp-tooltiptext">
|
164 |
+
<?=
|
165 |
+
esc_html__('Converted payment of', 'woocommerce-mercadopago') . " " .
|
166 |
+
$woocommerce_currency . " " . esc_html__('for', 'woocommerce-mercadopago') . " " .
|
167 |
+
$account_currency;
|
168 |
+
?>
|
169 |
+
</span>
|
170 |
+
</div>
|
171 |
+
<em>*</em>
|
172 |
+
</label>
|
173 |
<?php else : ?>
|
174 |
+
<label for="installments" class="mp-label-form"><?= __('Select the number of installment', 'woocommerce-mercadopago') ?></label>
|
175 |
<?php endif; ?>
|
176 |
|
177 |
<select class="mp-form-control mp-pointer mp-mt-5" id="installments" data-checkout="installments" name="mercadopago_custom[installments]"></select>
|
247 |
</div>
|
248 |
|
249 |
<script type="text/javascript">
|
|
|
250 |
//collapsible payments
|
251 |
var show_payments = document.querySelector("#button-show-payments")
|
252 |
var frame_payments = document.querySelector("#mp-frame-payments");
|
297 |
}
|
298 |
|
299 |
//mercadopago function
|
300 |
+
(function($) {
|
301 |
+
|
302 |
+
var mercado_pago = false;
|
303 |
+
var MPv1 = {
|
304 |
debug: true,
|
305 |
add_truncated_card: true,
|
306 |
site_id: "",
|
319 |
"couponCode",
|
320 |
"applyCoupon"
|
321 |
],
|
322 |
+
inputs_to_create_token: [
|
323 |
"cardNumber",
|
324 |
"cardExpirationDate",
|
325 |
"cardholderName",
|
548 |
|
549 |
var cardSelector = document.querySelector(MPv1.selectors.paymentMethodSelector);
|
550 |
|
551 |
+
// if (cardSelector && cardSelector[cardSelector.options.selectedIndex].value != "-1") {
|
552 |
+
// return cardSelector[cardSelector.options.selectedIndex]
|
553 |
+
// .getAttribute("first_six_digits");
|
554 |
+
// }
|
555 |
|
556 |
var ccNumber = document.querySelector(MPv1.selectors.cardNumber);
|
557 |
return ccNumber.value.replace(/[ .-]/g, "").slice(0, 6);
|
563 |
var bin = MPv1.getBin();
|
564 |
|
565 |
if (bin.length == 0) {
|
566 |
+
MPv1.resetBackgroundCard();
|
567 |
|
568 |
MPv1.hideIssuer();
|
569 |
|
919 |
.indexOf(element.getAttribute("data-checkout")) > -1) {
|
920 |
|
921 |
if (element.value == -1 || element.value == "") {
|
922 |
+
element.focus();
|
923 |
return false;
|
924 |
+
}
|
925 |
+
}
|
926 |
+
}
|
927 |
+
return true;
|
928 |
}
|
929 |
|
930 |
MPv1.createToken = function() {
|
938 |
var $form = MPv1.getForm();
|
939 |
|
940 |
Mercadopago.createToken($form, MPv1.sdkResponseHandler);
|
941 |
+
|
942 |
return false;
|
943 |
}
|
944 |
|
948 |
|
949 |
if (status != 200 && status != 201) {
|
950 |
MPv1.showErrors(response);
|
951 |
+
} else {
|
|
|
952 |
var token = document.querySelector(MPv1.selectors.token);
|
953 |
token.value = response.id;
|
954 |
|
957 |
document.querySelector(MPv1.selectors.cardTruncated).value = card;
|
958 |
}
|
959 |
|
960 |
+
mercado_pago = true;
|
961 |
+
$('form.checkout, form#order_review').submit();
|
962 |
}
|
963 |
}
|
964 |
|
1059 |
}
|
1060 |
};
|
1061 |
|
1062 |
+
$('body').on('focusout', '#cardNumber', MPv1.guessingPaymentMethod);
|
1063 |
+
|
1064 |
+
|
1065 |
MPv1.addListenerEvent(
|
1066 |
document.querySelector(MPv1.selectors.cardNumber),
|
1067 |
"keyup", MPv1.clearOptions
|
1192 |
}
|
1193 |
|
1194 |
if (MPv1.site_id == "MLM") {
|
1195 |
+
document.querySelector(MPv1.selectors.mpDoc).style.display = "none";
|
1196 |
document.querySelector(MPv1.selectors.formCustomerAndCard).removeAttribute("style");
|
1197 |
document.querySelector(MPv1.selectors.mpSecurityCodeCustomerAndCard).style.display = "none";
|
1198 |
|
1247 |
|
1248 |
this.MPv1 = MPv1;
|
1249 |
|
|
|
|
|
|
|
|
|
1250 |
|
1251 |
+
|
1252 |
+
$('body').on('updated_checkout', function() {
|
1253 |
+
var field = $('body #cardNumber');
|
1254 |
+
|
1255 |
+
if (0 < field.length) {
|
1256 |
+
field.focusout();
|
1257 |
+
}
|
1258 |
+
});
|
1259 |
|
1260 |
// get action button submit
|
1261 |
$('form.checkout').on('checkout_place_order_woo-mercado-pago-custom', function() {
|
1262 |
+
if (mercado_pago) {
|
1263 |
mercado_pago = false;
|
1264 |
|
1265 |
return true;
|
1266 |
}
|
|
|
|
|
|
|
|
|
1267 |
|
1268 |
+
if (!document.getElementById('payment_method_woo-mercado-pago-custom').checked) {
|
1269 |
+
return true;
|
1270 |
+
}
|
1271 |
+
|
1272 |
+
if (MPv1.validateInputsCreateToken()) {
|
1273 |
return MPv1.createToken();
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
return false;
|
1277 |
});
|
1278 |
|
1279 |
+
$('form#order_review').submit(function() {
|
1280 |
+
if (mercado_pago) {
|
|
|
1281 |
mercado_pago = false;
|
1282 |
|
1283 |
return true;
|
1284 |
}
|
|
|
|
|
|
|
|
|
1285 |
|
1286 |
+
if (!document.getElementById('payment_method_woo-mercado-pago-custom').checked) {
|
1287 |
+
return true;
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
if (MPv1.validateInputsCreateToken()) {
|
1291 |
return MPv1.createToken();
|
|
|
|
|
|
|
1292 |
}
|
1293 |
+
|
1294 |
+
return false;
|
1295 |
+
});
|
1296 |
+
|
1297 |
+
}(jQuery));
|
1298 |
|
1299 |
// Overriding this function to give form padding attribute.
|
1300 |
MPv1.setForm = function() {
|
1328 |
} else {
|
1329 |
var $span = $form.querySelector("#mp-error-" + error.code);
|
1330 |
}
|
1331 |
+
|
1332 |
+
if ($span != undefined) {
|
1333 |
+
var $input = $form.querySelector($span.getAttribute("data-main"));
|
1334 |
+
$span.style.display = "inline-block";
|
1335 |
+
$input.classList.add("mp-form-control-error");
|
1336 |
+
}
|
1337 |
}
|
1338 |
+
return;
|
1339 |
}
|
1340 |
|
1341 |
MPv1.hideErrors = function() {
|
1353 |
|
1354 |
return;
|
1355 |
|
1356 |
+
}
|
1357 |
|
1358 |
/*
|
1359 |
* END Customization
|
woocommerce-mercadopago.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce Mercado Pago
|
4 |
* Plugin URI: https://github.com/mercadopago/cart-woocommerce
|
5 |
* Description: Configure the payment options and accept payments with cards, ticket and money of Mercado Pago account.
|
6 |
-
* Version: 4.0.
|
7 |
* Author: Mercado Pago
|
8 |
* Author URI: https://www.mercadopago.com.br/developers/
|
9 |
* Text Domain: woocommerce-mercadopago
|
@@ -37,14 +37,11 @@ function woocommerce_mercadopago_load_plugin_textdomain()
|
|
37 |
$text_domain = 'woocommerce-mercadopago';
|
38 |
$locale = apply_filters( 'plugin_locale', get_locale(), $text_domain );
|
39 |
|
40 |
-
$original_language_file =
|
41 |
-
$override_language_file = ABSPATH . 'wp-content/plugins/woocommerce-mercadopago/i18n/languages/woocommerce-mercadopago-'. $locale .'.mo';
|
42 |
|
43 |
// Unload the translation for the text domain of the plugin
|
44 |
unload_textdomain($text_domain);
|
45 |
// Load first the override file
|
46 |
-
load_textdomain($text_domain, $override_language_file );
|
47 |
-
// Then load the original translation file
|
48 |
load_textdomain($text_domain, $original_language_file );
|
49 |
}
|
50 |
add_action( 'plugins_loaded', 'woocommerce_mercadopago_load_plugin_textdomain' );
|
@@ -89,6 +86,7 @@ require_once dirname(__FILE__) . '/includes/module/sdk/lib/MP.php';
|
|
89 |
// Load module class if it wasn't loaded yet.
|
90 |
if (!class_exists('WC_WooMercadoPago_Module'))
|
91 |
{
|
|
|
92 |
require_once dirname(__FILE__) . '/includes/module/WC_WooMercadoPago_Exception.php';
|
93 |
require_once dirname(__FILE__) . '/includes/module/WC_WooMercadoPago_Configs.php';
|
94 |
require_once dirname(__FILE__) . '/includes/module/log/WC_WooMercadoPago_Log.php';
|
3 |
* Plugin Name: WooCommerce Mercado Pago
|
4 |
* Plugin URI: https://github.com/mercadopago/cart-woocommerce
|
5 |
* Description: Configure the payment options and accept payments with cards, ticket and money of Mercado Pago account.
|
6 |
+
* Version: 4.0.8
|
7 |
* Author: Mercado Pago
|
8 |
* Author URI: https://www.mercadopago.com.br/developers/
|
9 |
* Text Domain: woocommerce-mercadopago
|
37 |
$text_domain = 'woocommerce-mercadopago';
|
38 |
$locale = apply_filters( 'plugin_locale', get_locale(), $text_domain );
|
39 |
|
40 |
+
$original_language_file = dirname(__FILE__) . '/i18n/languages/woocommerce-mercadopago-'. $locale .'.mo';
|
|
|
41 |
|
42 |
// Unload the translation for the text domain of the plugin
|
43 |
unload_textdomain($text_domain);
|
44 |
// Load first the override file
|
|
|
|
|
45 |
load_textdomain($text_domain, $original_language_file );
|
46 |
}
|
47 |
add_action( 'plugins_loaded', 'woocommerce_mercadopago_load_plugin_textdomain' );
|
86 |
// Load module class if it wasn't loaded yet.
|
87 |
if (!class_exists('WC_WooMercadoPago_Module'))
|
88 |
{
|
89 |
+
require_once dirname(__FILE__) . '/includes/module/config/WC_WooMercadoPago_Constants.php';
|
90 |
require_once dirname(__FILE__) . '/includes/module/WC_WooMercadoPago_Exception.php';
|
91 |
require_once dirname(__FILE__) . '/includes/module/WC_WooMercadoPago_Configs.php';
|
92 |
require_once dirname(__FILE__) . '/includes/module/log/WC_WooMercadoPago_Log.php';
|