WooCommerce MercadoPago - Version 5.0.1

Version Description

Download this release

Release Info

Developer mercadopago
Plugin Icon 128x128 WooCommerce MercadoPago
Version 5.0.1
Comparing to
See all releases

Code changes from version 5.0.0 to 5.0.1

i18n/languages/woocommerce-mercadopago.pot CHANGED
@@ -157,40 +157,40 @@ msgstr ""
157
  msgid "Update the WooCommerce order to "
158
  msgstr ""
159
 
160
- #: includes/notification/class-wc-woomercadopago-notification-abstract.php:183
161
  msgid "Payment approved."
162
  msgstr ""
163
 
164
- #: includes/notification/class-wc-woomercadopago-notification-abstract.php:233, includes/notification/class-wc-woomercadopago-notification-abstract.php:236
165
  msgid "Waiting for the ticket payment."
166
  msgstr ""
167
 
168
- #: includes/notification/class-wc-woomercadopago-notification-abstract.php:244
169
  msgid "The customer has not made the payment yet."
170
  msgstr ""
171
 
172
- #: includes/notification/class-wc-woomercadopago-notification-abstract.php:263
173
  msgid "Payment is pending review."
174
  msgstr ""
175
 
176
- #: includes/notification/class-wc-woomercadopago-notification-abstract.php:280
177
  msgid "Payment was declined. The customer can try again."
178
  msgstr ""
179
 
180
- #: includes/notification/class-wc-woomercadopago-notification-abstract.php:295
181
  msgid "Payment was returned to the customer."
182
  msgstr ""
183
 
184
- #: includes/notification/class-wc-woomercadopago-notification-abstract.php:309
185
  msgid "Payment was canceled."
186
  msgstr ""
187
 
188
- #: includes/notification/class-wc-woomercadopago-notification-abstract.php:324, includes/notification/class-wc-woomercadopago-notification-abstract.php:336
189
  msgid "The payment is in mediation or the purchase was unknown by the customer."
190
  msgstr ""
191
 
192
  #. translators: 1: payment_id 2: status
193
- #: includes/notification/class-wc-woomercadopago-notification-abstract.php:438
194
  msgid "Mercado Pago: The payment %1$s was notified by Mercado Pago with status %2$s."
195
  msgstr ""
196
 
157
  msgid "Update the WooCommerce order to "
158
  msgstr ""
159
 
160
+ #: includes/notification/class-wc-woomercadopago-notification-abstract.php:185
161
  msgid "Payment approved."
162
  msgstr ""
163
 
164
+ #: includes/notification/class-wc-woomercadopago-notification-abstract.php:235, includes/notification/class-wc-woomercadopago-notification-abstract.php:238
165
  msgid "Waiting for the ticket payment."
166
  msgstr ""
167
 
168
+ #: includes/notification/class-wc-woomercadopago-notification-abstract.php:246
169
  msgid "The customer has not made the payment yet."
170
  msgstr ""
171
 
172
+ #: includes/notification/class-wc-woomercadopago-notification-abstract.php:265
173
  msgid "Payment is pending review."
174
  msgstr ""
175
 
176
+ #: includes/notification/class-wc-woomercadopago-notification-abstract.php:282
177
  msgid "Payment was declined. The customer can try again."
178
  msgstr ""
179
 
180
+ #: includes/notification/class-wc-woomercadopago-notification-abstract.php:297
181
  msgid "Payment was returned to the customer."
182
  msgstr ""
183
 
184
+ #: includes/notification/class-wc-woomercadopago-notification-abstract.php:311
185
  msgid "Payment was canceled."
186
  msgstr ""
187
 
188
+ #: includes/notification/class-wc-woomercadopago-notification-abstract.php:326, includes/notification/class-wc-woomercadopago-notification-abstract.php:338
189
  msgid "The payment is in mediation or the purchase was unknown by the customer."
190
  msgstr ""
191
 
192
  #. translators: 1: payment_id 2: status
193
+ #: includes/notification/class-wc-woomercadopago-notification-abstract.php:440
194
  msgid "Mercado Pago: The payment %1$s was notified by Mercado Pago with status %2$s."
195
  msgstr ""
196
 
includes/module/class-wc-woomercadopago-configs.php CHANGED
@@ -322,9 +322,19 @@ class WC_WooMercadoPago_Configs {
322
  $api_request = wc_clean( $wp->query_vars['wc-api'] );
323
  if ( ! empty( $api_request ) && in_array(
324
  strtolower( $api_request ),
325
- array( 'wc_woomercadopago_basic_gateway', 'wc_woomercadopago_custom_gateway', 'wc_woomercadopago_ticket_gateway' ),
 
 
 
 
 
 
 
326
  true
327
  ) ) {
 
 
 
328
  $methods[] = $api_request;
329
  }
330
  return $methods;
322
  $api_request = wc_clean( $wp->query_vars['wc-api'] );
323
  if ( ! empty( $api_request ) && in_array(
324
  strtolower( $api_request ),
325
+ array(
326
+ 'wc_woomercadopago_basic_gateway',
327
+ 'wc_woomercadopago_custom_gateway',
328
+ 'wc_woomercadopago_ticket_gateway',
329
+ 'wc_woomercadopago_basicgateway',
330
+ 'wc_woomercadopago_customgateway',
331
+ 'wc_woomercadopago_ticketgateway',
332
+ ),
333
  true
334
  ) ) {
335
+ if ( ! preg_match( '/(_gateway)/i', $api_request ) ) {
336
+ $api_request = preg_replace( '/gateway/i', '_Gateway', $api_request );
337
+ }
338
  $methods[] = $api_request;
339
  }
340
  return $methods;
includes/module/config/class-wc-woomercadopago-constants.php CHANGED
@@ -23,7 +23,7 @@ class WC_WooMercadoPago_Constants {
23
  const PRODUCT_ID_DESKTOP = 'BT7OF5FEOO6G01NJK3QG';
24
  const PRODUCT_ID_MOBILE = 'BT7OFH09QS3001K5A0H0';
25
  const PLATAFORM_ID = 'bo2hnr2ic4p001kbgpt0';
26
- const VERSION = '5.0.0';
27
  const MIN_PHP = 5.6;
28
  const API_MP_BASE_URL = 'https://api.mercadopago.com';
29
  const PAYMENT_GATEWAYS = array(
23
  const PRODUCT_ID_DESKTOP = 'BT7OF5FEOO6G01NJK3QG';
24
  const PRODUCT_ID_MOBILE = 'BT7OFH09QS3001K5A0H0';
25
  const PLATAFORM_ID = 'bo2hnr2ic4p001kbgpt0';
26
+ const VERSION = '5.0.1';
27
  const MIN_PHP = 5.6;
28
  const API_MP_BASE_URL = 'https://api.mercadopago.com';
29
  const PAYMENT_GATEWAYS = array(
includes/notification/class-wc-woomercadopago-notification-abstract.php CHANGED
@@ -61,6 +61,8 @@ abstract class WC_WooMercadoPago_Notification_Abstract {
61
  $this->payment = $payment;
62
 
63
  add_action( 'woocommerce_api_' . strtolower( get_class( $payment ) ), array( $this, 'check_ipn_response' ) );
 
 
64
  add_action( 'valid_mercadopago_ipn_request', array( $this, 'successful_request' ) );
65
  add_action( 'woocommerce_order_status_cancelled', array( $this, 'process_cancel_order_meta_box_actions' ), 10, 1 );
66
  }
61
  $this->payment = $payment;
62
 
63
  add_action( 'woocommerce_api_' . strtolower( get_class( $payment ) ), array( $this, 'check_ipn_response' ) );
64
+ // @todo remove when 5 is the most used.
65
+ add_action( 'woocommerce_api_' . strtolower( preg_replace( '/_gateway/i', 'Gateway', get_class( $payment ) ) ), array( $this, 'check_ipn_response' ) );
66
  add_action( 'valid_mercadopago_ipn_request', array( $this, 'successful_request' ) );
67
  add_action( 'woocommerce_order_status_cancelled', array( $this, 'process_cancel_order_meta_box_actions' ), 10, 1 );
68
  }
index.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  /**
3
- * Part of Woo Mercado Pago Module
4
- * Author - Mercado Pago
5
- * Developer
6
- * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
7
- * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
8
- *
9
- * @package MercadoPago
10
- * @category Includes
11
- * @author Mercado Pago
12
- */
13
 
14
  exit;
1
  <?php
2
  /**
3
+ * Part of Woo Mercado Pago Module
4
+ * Author - Mercado Pago
5
+ * Developer
6
+ * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
7
+ * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
8
+ *
9
+ * @package MercadoPago
10
+ * @category Includes
11
+ * @author Mercado Pago
12
+ */
13
 
14
  exit;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: ecommerce, mercadopago, woocommerce
4
  Requires at least: 4.9.10
5
  Tested up to: 5.6.2
6
  Requires PHP: 5.6
7
- Stable tag: 5.0.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -116,6 +116,10 @@ Set up both the plugin and the checkouts you want to activate on your payment av
116
  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.
117
 
118
  == Changelog ==
 
 
 
 
119
  = v5.0.0 (24/02/2021) =
120
  * Features
121
  - Compatibility with WooCommerce v5.0.0
4
  Requires at least: 4.9.10
5
  Tested up to: 5.6.2
6
  Requires PHP: 5.6
7
+ Stable tag: 5.0.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
116
  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.
117
 
118
  == Changelog ==
119
+ = v5.0.1 (10/03/2021) =
120
+ * Features
121
+ - Compatibility with old notification urls
122
+
123
  = v5.0.0 (24/02/2021) =
124
  * Features
125
  - Compatibility with WooCommerce v5.0.0
woocommerce-mercadopago.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Mercado Pago payments for WooCommerce
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: 5.0.0
7
  * Author: Mercado Pago
8
  * Author URI: https://developers.mercadopago.com/
9
  * Text Domain: woocommerce-mercadopago
3
  * Plugin Name: Mercado Pago payments for WooCommerce
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: 5.0.1
7
  * Author: Mercado Pago
8
  * Author URI: https://developers.mercadopago.com/
9
  * Text Domain: woocommerce-mercadopago