Skip to content

Commit

Permalink
Merge pull request #263 from PluginAndPartners/master
Browse files Browse the repository at this point in the history
New Release v4.6.2
  • Loading branch information
lira authored Jan 6, 2021
2 parents 3f4824a + db3c63b commit 455b36c
Show file tree
Hide file tree
Showing 26 changed files with 82 additions and 76 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.6.2] - 2021-01-06
### Changed
- Changed loading of Mercado Pago SDK at custom checkout.
## [4.6.1] - 2021-01-04
### Added
- Add support to LearnPress
Expand Down
92 changes: 44 additions & 48 deletions assets/js/credit-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
public_key: wc_mercadopago_params.public_key
};

var sdkTagScript = document.createElement('script');
sdkTagScript.src = 'https://secure.mlstatic.com/sdk/javascript/v1/mercadopago.js?_=wc' + wc_mercadopago_params.plugin_version;
sdkTagScript.onload = function () {
// Set mercadopago public_key
$.getScript('https://secure.mlstatic.com/sdk/javascript/v1/mercadopago.js').done(function () {
// Set Public_key
Mercadopago.setPublishableKey(seller.public_key);
};
});

var coupon_of_discounts = {
discount_action_url: wc_mercadopago_params.discount_action_url,
Expand Down Expand Up @@ -66,7 +66,7 @@
function showPaymentsLink() {
var frame_payments = document.querySelector('#mp-frame-payments');
$('#button-show-payments').on('click', function () {
frame_payments.style.display = frame_payments.style.display === 'inline-block' ? 'none' : 'inline-block';
frame_payments.style.display = frame_payments.style.display === 'inline-block' ? 'none' : 'inline-block';
});
}

Expand Down Expand Up @@ -170,40 +170,40 @@
* Check what information is necessary to pay and show inputs
*/
function additionalInfoHandler() {
if (additionalInfoNeeded.cardholder_name) {
document.getElementById('mp-card-holder-div').style.display = 'block';
} else {
document.getElementById('mp-card-holder-div').style.display = 'none';
}
if (additionalInfoNeeded.cardholder_name) {
document.getElementById('mp-card-holder-div').style.display = 'block';
} else {
document.getElementById('mp-card-holder-div').style.display = 'none';
}

if (additionalInfoNeeded.issuer) {
document.getElementById('mp-issuer-div').style.display = 'block';
document.getElementById('installments-div').classList.remove('mp-col-md-12');
document.getElementById('installments-div').classList.add('mp-col-md-8');
Mercadopago.getIssuers(objPaymentMethod.id, getBin(), issuersHandler);
} else {
clearIssuer();
setInstallments();
}
if (additionalInfoNeeded.issuer) {
document.getElementById('mp-issuer-div').style.display = 'block';
document.getElementById('installments-div').classList.remove('mp-col-md-12');
document.getElementById('installments-div').classList.add('mp-col-md-8');
Mercadopago.getIssuers(objPaymentMethod.id, getBin(), issuersHandler);
} else {
clearIssuer();
setInstallments();
}

if (additionalInfoNeeded.cardholder_identification_type) {
document.getElementById('mp-doc-div').style.display = 'inline-block';
document.getElementById('mp-doc-type-div').style.display = 'block';
Mercadopago.getIdentificationTypes();
} else {
document.getElementById('mp-doc-type-div').style.display = 'none';
}
if (additionalInfoNeeded.cardholder_identification_type) {
document.getElementById('mp-doc-div').style.display = 'inline-block';
document.getElementById('mp-doc-type-div').style.display = 'block';
Mercadopago.getIdentificationTypes();
} else {
document.getElementById('mp-doc-type-div').style.display = 'none';
}

if (additionalInfoNeeded.cardholder_identification_number) {
document.getElementById('mp-doc-div').style.display = 'inline-block';
document.getElementById('mp-doc-number-div').style.display = 'block';
} else {
document.getElementById('mp-doc-number-div').style.display = 'none';
}
if (additionalInfoNeeded.cardholder_identification_number) {
document.getElementById('mp-doc-div').style.display = 'inline-block';
document.getElementById('mp-doc-number-div').style.display = 'block';
} else {
document.getElementById('mp-doc-number-div').style.display = 'none';
}

if (!additionalInfoNeeded.cardholder_identification_type && !additionalInfoNeeded.cardholder_identification_number) {
document.getElementById('mp-doc-div').style.display = 'none';
}
if (!additionalInfoNeeded.cardholder_identification_type && !additionalInfoNeeded.cardholder_identification_number) {
document.getElementById('mp-doc-div').style.display = 'none';
}
}

/**
Expand Down Expand Up @@ -742,23 +742,23 @@
*/
function currencyIdToCurrency(currency_id) {
if (currency_id === 'ARS') {
return '$';
return '$';
} else if (currency_id === 'BRL') {
return 'R$';
return 'R$';
} else if (currency_id === 'COP') {
return '$';
return '$';
} else if (currency_id === 'CLP') {
return '$';
return '$';
} else if (currency_id === 'MXN') {
return '$';
return '$';
} else if (currency_id === 'VEF') {
return 'Bs';
return 'Bs';
} else if (currency_id === 'PEN') {
return 'S/';
return 'S/';
} else if (currency_id === 'UYU') {
return '$U';
return '$U';
} else {
return '$';
return '$';
}
}

Expand Down Expand Up @@ -802,9 +802,5 @@
$('form#order_review').submit(function () {
return mercadoPagoFormHandler();
});

window.addEventListener('load', function() {
document.querySelector('body').append(sdkTagScript);
});
});
}(jQuery));
2 changes: 1 addition & 1 deletion assets/js/credit-card.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions changelog.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
CHANGELOG:
== Changelog ==
= v4.6.2 (06/01/2021) =
* Bug fixes
- Changed loading of Mercado Pago SDK at custom checkout

= v4.6.1 (04/01/2021) =

* Features
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-es_AR.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/languages/woocommerce-mercadopago-es_AR.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Mercado Pago payments for WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.1\n"
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
"PO-Revision-Date: 2020-12-29 19:45-0300\n"
"PO-Revision-Date: 2021-01-06 14:28-0300\n"
"X-Generator: Poedit 2.4.2\n"
"X-Domain: woocommerce-mercadopago\n"
"Last-Translator: \n"
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-es_CL.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/languages/woocommerce-mercadopago-es_CL.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Mercado Pago payments for WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.1\n"
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
"PO-Revision-Date: 2020-12-29 19:45-0300\n"
"PO-Revision-Date: 2021-01-06 14:27-0300\n"
"X-Generator: Poedit 2.4.2\n"
"X-Domain: woocommerce-mercadopago\n"
"Last-Translator: \n"
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-es_CO.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/languages/woocommerce-mercadopago-es_CO.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Mercado Pago payments for WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.1\n"
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
"PO-Revision-Date: 2020-12-29 19:45-0300\n"
"PO-Revision-Date: 2021-01-06 14:28-0300\n"
"X-Generator: Poedit 2.4.2\n"
"X-Domain: woocommerce-mercadopago\n"
"Last-Translator: \n"
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-es_ES.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/languages/woocommerce-mercadopago-es_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Mercado Pago payments for WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.1\n"
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
"PO-Revision-Date: 2020-12-29 19:45-0300\n"
"PO-Revision-Date: 2021-01-06 14:28-0300\n"
"X-Generator: Poedit 2.4.2\n"
"X-Domain: woocommerce-mercadopago\n"
"Last-Translator: \n"
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-es_MX.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/languages/woocommerce-mercadopago-es_MX.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Mercado Pago payments for WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.1\n"
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
"PO-Revision-Date: 2020-12-29 19:45-0300\n"
"PO-Revision-Date: 2021-01-06 14:28-0300\n"
"X-Generator: Poedit 2.4.2\n"
"X-Domain: woocommerce-mercadopago\n"
"Last-Translator: \n"
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-es_PE.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/languages/woocommerce-mercadopago-es_PE.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Mercado Pago payments for WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.1\n"
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
"PO-Revision-Date: 2020-12-29 19:45-0300\n"
"PO-Revision-Date: 2021-01-06 14:28-0300\n"
"X-Generator: Poedit 2.4.2\n"
"X-Domain: woocommerce-mercadopago\n"
"Last-Translator: \n"
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-es_UY.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/languages/woocommerce-mercadopago-es_UY.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Mercado Pago payments for WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.1\n"
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
"PO-Revision-Date: 2020-12-29 19:46-0300\n"
"PO-Revision-Date: 2021-01-06 14:28-0300\n"
"X-Generator: Poedit 2.4.2\n"
"X-Domain: woocommerce-mercadopago\n"
"Last-Translator: \n"
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-es_VE.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/languages/woocommerce-mercadopago-es_VE.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Mercado Pago payments for WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.1\n"
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
"PO-Revision-Date: 2020-12-29 19:46-0300\n"
"PO-Revision-Date: 2021-01-06 14:29-0300\n"
"X-Generator: Poedit 2.4.2\n"
"X-Domain: woocommerce-mercadopago\n"
"Last-Translator: \n"
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-pt_BR.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/languages/woocommerce-mercadopago-pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Mercado Pago payments for WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.1\n"
"Project-Id-Version: Mercado Pago payments for WooCommerce 4.6.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-mercadopago\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2019-09-05T23:48:06-04:00\n"
"PO-Revision-Date: 2020-12-29 19:46-0300\n"
"PO-Revision-Date: 2021-01-06 14:29-0300\n"
"X-Generator: Poedit 2.4.2\n"
"X-Domain: woocommerce-mercadopago\n"
"Last-Translator: \n"
Expand Down
10 changes: 5 additions & 5 deletions i18n/languages/woocommerce-mercadopago.pot
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ msgstr ""
msgid "Cancel order"
msgstr ""

#: includes/module/WC_WooMercadoPago_Module.php:242, includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:364
#: includes/module/WC_WooMercadoPago_Module.php:242, includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:348
msgid "Fill in your credentials to enable payment methods."
msgstr ""

Expand Down Expand Up @@ -1205,19 +1205,19 @@ msgstr ""
msgid " and fee of"
msgstr ""

#: includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:324
#: includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:308
msgid "<b>Public Key</b> production credential is invalid. Review the field to receive real payments."
msgstr ""

#: includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:334
#: includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:318
msgid "<b>Public Key</b> test credential is invalid. Review the field to perform tests in your store."
msgstr ""

#: includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:344
#: includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:328
msgid "<b>Access Token</b> production credential is invalid. Remember that it must be complete to receive real payments."
msgstr ""

#: includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:354
#: includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php:338
msgid "<b>Access Token</b> test credential is invalid. Review the field to perform tests in your store."
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion includes/module/config/WC_WooMercadoPago_Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WC_WooMercadoPago_Constants
const PRODUCT_ID_DESKTOP = 'BT7OF5FEOO6G01NJK3QG';
const PRODUCT_ID_MOBILE = 'BT7OFH09QS3001K5A0H0';
const PLATAFORM_ID = 'bo2hnr2ic4p001kbgpt0';
const VERSION = '4.6.1';
const VERSION = '4.6.2';
const MIN_PHP = 5.6;
const API_MP_BASE_URL = 'https://api.mercadopago.com';
}
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: ecommerce, mercadopago, woocommerce
Requires at least: 4.9.10
Tested up to: 5.6
Requires PHP: 5.6
Stable tag: 4.6.1
Stable tag: 4.6.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -116,8 +116,11 @@ Set up both the plugin and the checkouts you want to activate on your payment av
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.

== Changelog ==
= v4.6.1 (04/01/2021) =
= v4.6.2 (06/01/2021) =
* Bug fixes
- Changed loading of Mercado Pago SDK at custom checkout

= v4.6.1 (04/01/2021) =
* Features
- Add support to LearnPress
- Compatibility with Wordpress v5.6 and WooCommerce v4.8
Expand Down
2 changes: 1 addition & 1 deletion woocommerce-mercadopago.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Mercado Pago payments for WooCommerce
* Plugin URI: https://github.com/mercadopago/cart-woocommerce
* Description: Configure the payment options and accept payments with cards, ticket and money of Mercado Pago account.
* Version: 4.6.1
* Version: 4.6.2
* Author: Mercado Pago
* Author URI: https://developers.mercadopago.com/
* Text Domain: woocommerce-mercadopago
Expand Down

0 comments on commit 455b36c

Please sign in to comment.