WooCommerce MercadoPago - Version 2.0.5

Version Description

  • 2016/07/04 =

  • Improved Payment Notification handler.

  • Added full support for Chile in the settings.

Download this release

Release Info

Developer claudiosanches
Plugin Icon 128x128 WooCommerce MercadoPago
Version 2.0.5
Comparing to
See all releases

Code changes from version 2.0.4 to 2.0.5

includes/class-wc-mercadopago-gateway.php CHANGED
@@ -8,8 +8,6 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
8
 
9
  /**
10
  * Constructor for the gateway.
11
- *
12
- * @return void
13
  */
14
  public function __construct() {
15
 
@@ -38,7 +36,7 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
38
  $this->client_secret = $this->get_option( 'client_secret' );
39
  $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
40
  $this->method = $this->get_option( 'method', 'modal' );
41
- $this->sandbox = $this->get_option( 'sandbox', false );
42
  $this->debug = $this->get_option( 'debug' );
43
 
44
  // Actions.
@@ -101,19 +99,18 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
101
 
102
  /**
103
  * Initialise Gateway Settings Form Fields.
104
- *
105
- * @return void
106
  */
107
  public function init_form_fields() {
108
 
109
  $api_secret_locale = sprintf(
110
- '<a href="https://www.mercadopago.com/mla/herramientas/aplicaciones" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mlb/ferramentas/aplicacoes" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mco/ferramentas/aplicacoes" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mlm/herramientas/aplicaciones" target="_blank">%s</a> %s <a href="https://www.mercadopago.com/mlv/herramientas/aplicaciones" target="_blank">%s</a>',
111
  __( 'Argentine', 'woocommerce-mercadopago' ),
112
  __( 'Brazil', 'woocommerce-mercadopago' ),
113
  __( 'Colombia', 'woocommerce-mercadopago' ),
114
  __( 'Mexico', 'woocommerce-mercadopago' ),
 
115
  __( 'or', 'woocommerce-mercadopago' ),
116
- __( 'Venezuela', 'woocommerce-mercadopago' )
117
  );
118
 
119
  $this->form_fields = array(
@@ -397,8 +394,6 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
397
 
398
  /**
399
  * Output for the order received page.
400
- *
401
- * @return void
402
  */
403
  public function receipt_page( $order ) {
404
  echo $this->generate_form( $order );
@@ -512,8 +507,6 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
512
 
513
  /**
514
  * Check API Response.
515
- *
516
- * @return void
517
  */
518
  public function check_ipn_response() {
519
  @ob_clean();
@@ -524,7 +517,7 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
524
  header( 'HTTP/1.1 200 OK' );
525
  do_action( 'valid_mercadopago_ipn_request', $data );
526
  } else {
527
- wp_die( __( 'MercadoPago Request Failure', 'woocommerce-mercadopago' ) );
528
  }
529
  }
530
 
@@ -532,8 +525,6 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
532
  * Successful Payment!
533
  *
534
  * @param array $posted MercadoPago post data.
535
- *
536
- * @return void
537
  */
538
  public function successful_request( $posted ) {
539
 
8
 
9
  /**
10
  * Constructor for the gateway.
 
 
11
  */
12
  public function __construct() {
13
 
36
  $this->client_secret = $this->get_option( 'client_secret' );
37
  $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
38
  $this->method = $this->get_option( 'method', 'modal' );
39
+ $this->sandbox = $this->get_option( 'sandbox', 'no' );
40
  $this->debug = $this->get_option( 'debug' );
41
 
42
  // Actions.
99
 
100
  /**
101
  * Initialise Gateway Settings Form Fields.
 
 
102
  */
103
  public function init_form_fields() {
104
 
105
  $api_secret_locale = sprintf(
106
+ '<a href="https://www.mercadopago.com/mla/herramientas/aplicaciones" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mlb/ferramentas/aplicacoes" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mco/ferramentas/aplicacoes" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mlm/herramientas/aplicaciones" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mlv/herramientas/aplicaciones" target="_blank">%s</a> %s <a href="https://www.mercadopago.com/mlc/herramientas/aplicaciones" target="_blank">%s</a>',
107
  __( 'Argentine', 'woocommerce-mercadopago' ),
108
  __( 'Brazil', 'woocommerce-mercadopago' ),
109
  __( 'Colombia', 'woocommerce-mercadopago' ),
110
  __( 'Mexico', 'woocommerce-mercadopago' ),
111
+ __( 'Venezuela', 'woocommerce-mercadopago' ),
112
  __( 'or', 'woocommerce-mercadopago' ),
113
+ __( 'Chile', 'woocommerce-mercadopago' )
114
  );
115
 
116
  $this->form_fields = array(
394
 
395
  /**
396
  * Output for the order received page.
 
 
397
  */
398
  public function receipt_page( $order ) {
399
  echo $this->generate_form( $order );
507
 
508
  /**
509
  * Check API Response.
 
 
510
  */
511
  public function check_ipn_response() {
512
  @ob_clean();
517
  header( 'HTTP/1.1 200 OK' );
518
  do_action( 'valid_mercadopago_ipn_request', $data );
519
  } else {
520
+ wp_die( __( 'Missing notification params.', 'woocommerce-mercadopago' ), __( 'MercadoPago Notification Handler', 'woocommerce-mercadopago' ), array( 'response' => 200 ) );
521
  }
522
  }
523
 
525
  * Successful Payment!
526
  *
527
  * @param array $posted MercadoPago post data.
 
 
528
  */
529
  public function successful_request( $posted ) {
530
 
languages/woocommerce-mercadopago-pt_BR.mo DELETED
Binary file
languages/woocommerce-mercadopago-pt_BR.po DELETED
@@ -1,280 +0,0 @@
1
- # Copyright (C) 2014 claudiosanches
2
- # This file is distributed under the GPLv2 or later.
3
- # Translators:
4
- # Claudio Sanches <contato@claudiosmweb.com>, 2014
5
- msgid ""
6
- msgstr ""
7
- "Project-Id-Version: WooCommerce MercadoPago\n"
8
- "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/woocommerce-mercadopago/\n"
9
- "POT-Creation-Date: 2014-08-16 20:09:56+00:00\n"
10
- "PO-Revision-Date: 2014-08-16 20:11+0000\n"
11
- "Last-Translator: Claudio Sanches <contato@claudiosmweb.com>\n"
12
- "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/woocommerce-mercadopago/language/pt_BR/)\n"
13
- "MIME-Version: 1.0\n"
14
- "Content-Type: text/plain; charset=UTF-8\n"
15
- "Content-Transfer-Encoding: 8bit\n"
16
- "Language: pt_BR\n"
17
- "Plural-Forms: nplurals=2; plural=(n > 1);\n"
18
- "X-Generator: grunt-wp-i18n 0.4.7\n"
19
-
20
- #: includes/class-wc-mercadopago-gateway.php:20
21
- #: includes/class-wc-mercadopago-gateway.php:142
22
- msgid "MercadoPago"
23
- msgstr "MercadoPago"
24
-
25
- #: includes/class-wc-mercadopago-gateway.php:122
26
- msgid "Argentine"
27
- msgstr "Argentina"
28
-
29
- #: includes/class-wc-mercadopago-gateway.php:123
30
- msgid "Brazil"
31
- msgstr "Brasil"
32
-
33
- #: includes/class-wc-mercadopago-gateway.php:124
34
- msgid "Colombia"
35
- msgstr "Colômbia"
36
-
37
- #: includes/class-wc-mercadopago-gateway.php:125
38
- msgid "Mexico"
39
- msgstr "México"
40
-
41
- #: includes/class-wc-mercadopago-gateway.php:126
42
- msgid "or"
43
- msgstr "ou"
44
-
45
- #: includes/class-wc-mercadopago-gateway.php:127
46
- msgid "Venezuela"
47
- msgstr "Venezuela"
48
-
49
- #: includes/class-wc-mercadopago-gateway.php:132
50
- msgid "Enable/Disable"
51
- msgstr "Habilita/Desabilita"
52
-
53
- #: includes/class-wc-mercadopago-gateway.php:134
54
- msgid "Enable MercadoPago standard"
55
- msgstr "Habilitar MercadoPago padrão"
56
-
57
- #: includes/class-wc-mercadopago-gateway.php:138
58
- msgid "Title"
59
- msgstr "Título"
60
-
61
- #: includes/class-wc-mercadopago-gateway.php:140
62
- msgid "This controls the title which the user sees during checkout."
63
- msgstr "Isto controla o título que o usuário vê durante o checkout."
64
-
65
- #: includes/class-wc-mercadopago-gateway.php:145
66
- msgid "Description"
67
- msgstr "Descrição"
68
-
69
- #: includes/class-wc-mercadopago-gateway.php:147
70
- msgid "This controls the description which the user sees during checkout."
71
- msgstr "Isso controla a descrição que o usuário vê durante o checkout."
72
-
73
- #: includes/class-wc-mercadopago-gateway.php:148
74
- #: includes/class-wc-mercadopago-gateway.php:332
75
- msgid "Pay via MercadoPago"
76
- msgstr "Pagar com MercadoPago"
77
-
78
- #: includes/class-wc-mercadopago-gateway.php:151
79
- msgid "MercadoPago Client_id"
80
- msgstr "Client_id do MercadoPago"
81
-
82
- #: includes/class-wc-mercadopago-gateway.php:153
83
- msgid "Please enter your MercadoPago Client_id."
84
- msgstr "Por favor digite o seu Client_id do MercadoPago."
85
-
86
- #: includes/class-wc-mercadopago-gateway.php:153
87
- #: includes/class-wc-mercadopago-gateway.php:159
88
- msgid "You can to get this information in MercadoPago from %s."
89
- msgstr "Você pode obter esta informação através do MercadoPago da %s."
90
-
91
- #: includes/class-wc-mercadopago-gateway.php:157
92
- msgid "MercadoPago Client_secret"
93
- msgstr "Client_secret do MercadoPago"
94
-
95
- #: includes/class-wc-mercadopago-gateway.php:159
96
- msgid "Please enter your MercadoPago Client_secret."
97
- msgstr "Por favor digite o seu Client_secret do MercadoPago."
98
-
99
- #: includes/class-wc-mercadopago-gateway.php:163
100
- msgid "Invoice Prefix"
101
- msgstr "Prefixo de pedido"
102
-
103
- #: includes/class-wc-mercadopago-gateway.php:165
104
- msgid ""
105
- "Please enter a prefix for your invoice numbers. If you use your MercadoPago "
106
- "account for multiple stores ensure this prefix is unqiue as MercadoPago will"
107
- " not allow orders with the same invoice number."
108
- msgstr "Por favor informe um prefixo para utilizar com os números de pedidos. Caso você utilize sua conta do MercadoPago em mais de uma loja, procure utilizar um prefixo único para cada loja."
109
-
110
- #: includes/class-wc-mercadopago-gateway.php:170
111
- msgid "Integration method"
112
- msgstr "Método de integração"
113
-
114
- #: includes/class-wc-mercadopago-gateway.php:172
115
- msgid ""
116
- "Choose how the customer will interact with the MercadoPago. Modal Window "
117
- "(Inside your store) Redirect (Client goes to MercadoPago)."
118
- msgstr "Escolha como o cliente vai interagir com o MercadoPago. Janela Modal (dentro de sua loja) redirecionamento (cliente vai para MercadoPago)."
119
-
120
- #: includes/class-wc-mercadopago-gateway.php:176
121
- msgid "Modal Window"
122
- msgstr "Janela Modal"
123
-
124
- #: includes/class-wc-mercadopago-gateway.php:177
125
- msgid "Redirect"
126
- msgstr "Redirecionar"
127
-
128
- #: includes/class-wc-mercadopago-gateway.php:181
129
- msgid "Gateway Testing"
130
- msgstr "Teste de Gateway"
131
-
132
- #: includes/class-wc-mercadopago-gateway.php:186
133
- msgid "MercadoPago Sandbox"
134
- msgstr "MercadoPago Sandbox"
135
-
136
- #: includes/class-wc-mercadopago-gateway.php:188
137
- msgid "Enable MercadoPago sandbox"
138
- msgstr "Habilitar sandbox do MercadoPago"
139
-
140
- #: includes/class-wc-mercadopago-gateway.php:190
141
- msgid "MercadoPago sandbox can be used to test payments."
142
- msgstr "MercadoPago sandbox pode ser utilizado para testar os pagamentos."
143
-
144
- #: includes/class-wc-mercadopago-gateway.php:193
145
- msgid "Debug Log"
146
- msgstr "Log de depuração"
147
-
148
- #: includes/class-wc-mercadopago-gateway.php:195
149
- msgid "Enable logging"
150
- msgstr "Habilitar log"
151
-
152
- #: includes/class-wc-mercadopago-gateway.php:197
153
- msgid "Log MercadoPago events, such as API requests, inside %s"
154
- msgstr "Registra eventos do MercadoPago, tais como solicitações de API, dentro de %s"
155
-
156
- #: includes/class-wc-mercadopago-gateway.php:244
157
- msgid "Order %s"
158
- msgstr "Pedido %s"
159
-
160
- #: includes/class-wc-mercadopago-gateway.php:254
161
- msgid "Shipping via"
162
- msgstr "Entrega via"
163
-
164
- #: includes/class-wc-mercadopago-gateway.php:330
165
- msgid ""
166
- "Thank you for your order, please click the button below to pay with "
167
- "MercadoPago."
168
- msgstr "Obrigado por seu pedido, por favor clique no botão abaixo para pagar com MercadoPago."
169
-
170
- #: includes/class-wc-mercadopago-gateway.php:332
171
- msgid "Cancel order &amp; restore cart"
172
- msgstr "Cancelar pedido e restaurar carrinho"
173
-
174
- #: includes/class-wc-mercadopago-gateway.php:340
175
- msgid ""
176
- "An error has occurred while processing your payment, please try again. Or "
177
- "contact us for assistance."
178
- msgstr "Ocorreu um erro ao processar o seu pagamento, por favor tente novamente ou entre em contato para conseguir ajudar."
179
-
180
- #: includes/class-wc-mercadopago-gateway.php:342
181
- msgid "Click to try again"
182
- msgstr "Clique para tentar novamente"
183
-
184
- #: includes/class-wc-mercadopago-gateway.php:530
185
- msgid "MercadoPago Request Failure"
186
- msgstr "MercadoPago falha na requisição"
187
-
188
- #: includes/class-wc-mercadopago-gateway.php:566
189
- msgid "MercadoPago Transaction ID"
190
- msgstr "MercadoPago: ID da transação"
191
-
192
- #: includes/class-wc-mercadopago-gateway.php:573
193
- msgid "Payer email"
194
- msgstr "E-mail do comprador"
195
-
196
- #: includes/class-wc-mercadopago-gateway.php:580
197
- msgid "Payment type"
198
- msgstr "Tipo de pagamento"
199
-
200
- #: includes/class-wc-mercadopago-gateway.php:586
201
- msgid "MercadoPago: Payment approved."
202
- msgstr "MercadoPago: Pagamento aprovado."
203
-
204
- #: includes/class-wc-mercadopago-gateway.php:591
205
- msgid "MercadoPago: The user has not completed the payment process yet."
206
- msgstr "MercadoPago: O cliente ainda não efetuou o pagamento."
207
-
208
- #: includes/class-wc-mercadopago-gateway.php:595
209
- msgid "MercadoPago: Payment under review."
210
- msgstr "MercadoPago: Pagamento em análise."
211
-
212
- #: includes/class-wc-mercadopago-gateway.php:599
213
- msgid "MercadoPago: The payment was declined. The user can try again."
214
- msgstr "MercadoPago: O pagamento foi recusado. O cliente pode tentar novamente."
215
-
216
- #: includes/class-wc-mercadopago-gateway.php:603
217
- msgid "MercadoPago: The payment was returned to the user."
218
- msgstr "MercadoPago: O pagamento foi devolvido ao cliente."
219
-
220
- #: includes/class-wc-mercadopago-gateway.php:607
221
- msgid "MercadoPago: Payment canceled."
222
- msgstr "MercadoPago: Pagamento cancelado."
223
-
224
- #: includes/class-wc-mercadopago-gateway.php:611
225
- msgid "MercadoPago: It started a dispute for payment."
226
- msgstr "MercadoPago: Foi iniciada uma disputa para o pagamento."
227
-
228
- #: includes/class-wc-mercadopago-gateway.php:642
229
- #: includes/class-wc-mercadopago-gateway.php:651
230
- #: includes/class-wc-mercadopago-gateway.php:660
231
- msgid "MercadoPago Disabled"
232
- msgstr "MercadoPago Desabilitado"
233
-
234
- #: includes/class-wc-mercadopago-gateway.php:642
235
- msgid "You should inform your Client_id. %s"
236
- msgstr "Você deve informar o seu Client_id. %s"
237
-
238
- #: includes/class-wc-mercadopago-gateway.php:642
239
- #: includes/class-wc-mercadopago-gateway.php:651
240
- msgid "Click here to configure!"
241
- msgstr "Clique aqui para configurar!"
242
-
243
- #: includes/class-wc-mercadopago-gateway.php:651
244
- msgid "You should inform your Client_secret. %s"
245
- msgstr "Você deve informar o seu Client_secret. %s."
246
-
247
- #: includes/class-wc-mercadopago-gateway.php:660
248
- msgid ""
249
- "Currency <code>%s</code> is not supported. Please make sure that you use one"
250
- " of the following supported currencies: ARS, BRL, COP, MXN, USD or VEF."
251
- msgstr "A moeda <code>%s</code> não é suportada. Por favor, tenha certeza que esta utilizando uma das seguintes moedas que são suportadas: ARS, BRL, COP, MXN, USD ou VEF."
252
-
253
- #: woocommerce-mercadopago.php:102
254
- msgid ""
255
- "WooCommerce MercadoPago Gateway depends on the last version of %s to work!"
256
- msgstr "WooCommerce MercadoPago Gateway depende da última versão do %s para funcionar!"
257
-
258
- #: woocommerce-mercadopago.php:102
259
- msgid "WooCommerce"
260
- msgstr "WooCommerce"
261
-
262
- #. Plugin Name of the plugin/theme
263
- msgid "WooCommerce MercadoPago"
264
- msgstr "WooCommerce MercadoPago"
265
-
266
- #. Plugin URI of the plugin/theme
267
- msgid "https://github.com/claudiosmweb/woocommerce-mercadopago"
268
- msgstr "https://github.com/claudiosmweb/woocommerce-mercadopago"
269
-
270
- #. Description of the plugin/theme
271
- msgid "MercadoPago gateway for Woocommerce."
272
- msgstr "MercadoPago para WooCommerce."
273
-
274
- #. Author of the plugin/theme
275
- msgid "claudiosanches"
276
- msgstr "claudiosanches"
277
-
278
- #. Author URI of the plugin/theme
279
- msgid "http://claudiosmweb.com/"
280
- msgstr "http://claudiosmweb.com/"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/woocommerce-mercadopago.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce MercadoPago 2.0.4\n"
6
  "Report-Msgid-Bugs-To: "
7
  "http://wordpress.org/support/plugin/woocommerce-mercadopago/\n"
8
- "POT-Creation-Date: 2016-06-22 16:09:11+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -14,247 +14,259 @@ msgstr ""
14
  "Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
15
  "X-Generator: grunt-wp-i18n 0.4.9\n"
16
 
17
- #: includes/class-wc-mercadopago-gateway.php:20
18
- #: includes/class-wc-mercadopago-gateway.php:131
19
  msgid "MercadoPago"
20
  msgstr ""
21
 
22
- #: includes/class-wc-mercadopago-gateway.php:111
23
  msgid "Argentine"
24
  msgstr ""
25
 
26
- #: includes/class-wc-mercadopago-gateway.php:112
27
  msgid "Brazil"
28
  msgstr ""
29
 
30
- #: includes/class-wc-mercadopago-gateway.php:113
31
  msgid "Colombia"
32
  msgstr ""
33
 
34
- #: includes/class-wc-mercadopago-gateway.php:114
35
  msgid "Mexico"
36
  msgstr ""
37
 
38
- #: includes/class-wc-mercadopago-gateway.php:115
 
 
 
 
39
  msgid "or"
40
  msgstr ""
41
 
42
- #: includes/class-wc-mercadopago-gateway.php:116
43
- msgid "Venezuela"
44
  msgstr ""
45
 
46
- #: includes/class-wc-mercadopago-gateway.php:121
47
  msgid "Enable/Disable"
48
  msgstr ""
49
 
50
- #: includes/class-wc-mercadopago-gateway.php:123
51
  msgid "Enable MercadoPago standard"
52
  msgstr ""
53
 
54
- #: includes/class-wc-mercadopago-gateway.php:127
55
  msgid "Title"
56
  msgstr ""
57
 
58
- #: includes/class-wc-mercadopago-gateway.php:129
59
  msgid "This controls the title which the user sees during checkout."
60
  msgstr ""
61
 
62
- #: includes/class-wc-mercadopago-gateway.php:134
63
  msgid "Description"
64
  msgstr ""
65
 
66
- #: includes/class-wc-mercadopago-gateway.php:136
67
  msgid "This controls the description which the user sees during checkout."
68
  msgstr ""
69
 
70
- #: includes/class-wc-mercadopago-gateway.php:137
71
- #: includes/class-wc-mercadopago-gateway.php:333
72
  msgid "Pay via MercadoPago"
73
  msgstr ""
74
 
75
- #: includes/class-wc-mercadopago-gateway.php:140
76
  msgid "MercadoPago Client_id"
77
  msgstr ""
78
 
79
- #: includes/class-wc-mercadopago-gateway.php:142
80
  msgid "Please enter your MercadoPago Client_id."
81
  msgstr ""
82
 
83
- #: includes/class-wc-mercadopago-gateway.php:142
84
- #: includes/class-wc-mercadopago-gateway.php:148
85
  msgid "You can to get this information in MercadoPago from %s."
86
  msgstr ""
87
 
88
- #: includes/class-wc-mercadopago-gateway.php:146
89
  msgid "MercadoPago Client_secret"
90
  msgstr ""
91
 
92
- #: includes/class-wc-mercadopago-gateway.php:148
93
  msgid "Please enter your MercadoPago Client_secret."
94
  msgstr ""
95
 
96
- #: includes/class-wc-mercadopago-gateway.php:152
97
  msgid "Invoice Prefix"
98
  msgstr ""
99
 
100
- #: includes/class-wc-mercadopago-gateway.php:154
101
  msgid ""
102
  "Please enter a prefix for your invoice numbers. If you use your MercadoPago "
103
  "account for multiple stores ensure this prefix is unqiue as MercadoPago "
104
  "will not allow orders with the same invoice number."
105
  msgstr ""
106
 
107
- #: includes/class-wc-mercadopago-gateway.php:159
108
  msgid "Integration method"
109
  msgstr ""
110
 
111
- #: includes/class-wc-mercadopago-gateway.php:161
112
  msgid ""
113
  "Choose how the customer will interact with the MercadoPago. Modal Window "
114
  "(Inside your store) Redirect (Client goes to MercadoPago)."
115
  msgstr ""
116
 
117
- #: includes/class-wc-mercadopago-gateway.php:165
118
  msgid "Modal Window"
119
  msgstr ""
120
 
121
- #: includes/class-wc-mercadopago-gateway.php:166
122
  msgid "Redirect"
123
  msgstr ""
124
 
125
- #: includes/class-wc-mercadopago-gateway.php:170
126
  msgid "Gateway Testing"
127
  msgstr ""
128
 
129
- #: includes/class-wc-mercadopago-gateway.php:175
130
  msgid "MercadoPago Sandbox"
131
  msgstr ""
132
 
133
- #: includes/class-wc-mercadopago-gateway.php:177
134
  msgid "Enable MercadoPago sandbox"
135
  msgstr ""
136
 
137
- #: includes/class-wc-mercadopago-gateway.php:179
138
  msgid "MercadoPago sandbox can be used to test payments."
139
  msgstr ""
140
 
141
- #: includes/class-wc-mercadopago-gateway.php:182
142
  msgid "Debug Log"
143
  msgstr ""
144
 
145
- #: includes/class-wc-mercadopago-gateway.php:184
146
  msgid "Enable logging"
147
  msgstr ""
148
 
149
- #: includes/class-wc-mercadopago-gateway.php:186
150
  msgid "Log MercadoPago events, such as API requests, inside %s"
151
  msgstr ""
152
 
153
- #: includes/class-wc-mercadopago-gateway.php:247
154
  msgid "Order %s"
155
  msgstr ""
156
 
157
- #: includes/class-wc-mercadopago-gateway.php:257
158
  msgid "Shipping via"
159
  msgstr ""
160
 
161
- #: includes/class-wc-mercadopago-gateway.php:331
162
  msgid ""
163
  "Thank you for your order, please click the button below to pay with "
164
  "MercadoPago."
165
  msgstr ""
166
 
167
- #: includes/class-wc-mercadopago-gateway.php:333
168
  msgid "Cancel order &amp; restore cart"
169
  msgstr ""
170
 
171
- #: includes/class-wc-mercadopago-gateway.php:341
172
  msgid ""
173
  "An error has occurred while processing your payment, please try again. Or "
174
  "contact us for assistance."
175
  msgstr ""
176
 
177
- #: includes/class-wc-mercadopago-gateway.php:343
178
  msgid "Click to try again"
179
  msgstr ""
180
 
181
- #: includes/class-wc-mercadopago-gateway.php:527
182
- msgid "MercadoPago Request Failure"
183
  msgstr ""
184
 
185
- #: includes/class-wc-mercadopago-gateway.php:563
 
 
 
 
186
  msgid "MercadoPago Transaction ID"
187
  msgstr ""
188
 
189
- #: includes/class-wc-mercadopago-gateway.php:570
190
  msgid "Payer email"
191
  msgstr ""
192
 
193
- #: includes/class-wc-mercadopago-gateway.php:577
194
  msgid "Payment type"
195
  msgstr ""
196
 
197
- #: includes/class-wc-mercadopago-gateway.php:583
198
  msgid "MercadoPago: Payment approved."
199
  msgstr ""
200
 
201
- #: includes/class-wc-mercadopago-gateway.php:588
202
  msgid "MercadoPago: The user has not completed the payment process yet."
203
  msgstr ""
204
 
205
- #: includes/class-wc-mercadopago-gateway.php:592
206
  msgid "MercadoPago: Payment under review."
207
  msgstr ""
208
 
209
- #: includes/class-wc-mercadopago-gateway.php:596
210
  msgid "MercadoPago: The payment was declined. The user can try again."
211
  msgstr ""
212
 
213
- #: includes/class-wc-mercadopago-gateway.php:600
214
  msgid "MercadoPago: The payment was returned to the user."
215
  msgstr ""
216
 
217
- #: includes/class-wc-mercadopago-gateway.php:604
218
  msgid "MercadoPago: Payment canceled."
219
  msgstr ""
220
 
221
- #: includes/class-wc-mercadopago-gateway.php:608
222
  msgid "MercadoPago: It started a dispute for payment."
223
  msgstr ""
224
 
 
225
  #: includes/class-wc-mercadopago-gateway.php:639
226
  #: includes/class-wc-mercadopago-gateway.php:648
227
- #: includes/class-wc-mercadopago-gateway.php:657
228
  msgid "MercadoPago Disabled"
229
  msgstr ""
230
 
231
- #: includes/class-wc-mercadopago-gateway.php:639
232
  msgid "You should inform your Client_id. %s"
233
  msgstr ""
234
 
 
235
  #: includes/class-wc-mercadopago-gateway.php:639
236
- #: includes/class-wc-mercadopago-gateway.php:648
237
  msgid "Click here to configure!"
238
  msgstr ""
239
 
240
- #: includes/class-wc-mercadopago-gateway.php:648
241
  msgid "You should inform your Client_secret. %s"
242
  msgstr ""
243
 
244
- #: includes/class-wc-mercadopago-gateway.php:657
245
  msgid ""
246
  "Currency <code>%s</code> is not supported. Please make sure that you use "
247
  "one of the following supported currencies: ARS, BRL, COP, MXN, USD or VEF."
248
  msgstr ""
249
 
250
- #: woocommerce-mercadopago.php:102
251
  msgid "WooCommerce MercadoPago Gateway depends on the last version of %s to work!"
252
  msgstr ""
253
 
254
- #: woocommerce-mercadopago.php:102
255
  msgid "WooCommerce"
256
  msgstr ""
257
 
 
 
 
 
258
  #. Plugin Name of the plugin/theme
259
  msgid "WooCommerce MercadoPago"
260
  msgstr ""
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce MercadoPago 2.0.5\n"
6
  "Report-Msgid-Bugs-To: "
7
  "http://wordpress.org/support/plugin/woocommerce-mercadopago/\n"
8
+ "POT-Creation-Date: 2016-07-05 02:19:52+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
14
  "Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
15
  "X-Generator: grunt-wp-i18n 0.4.9\n"
16
 
17
+ #: includes/class-wc-mercadopago-gateway.php:18
18
+ #: includes/class-wc-mercadopago-gateway.php:128
19
  msgid "MercadoPago"
20
  msgstr ""
21
 
22
+ #: includes/class-wc-mercadopago-gateway.php:107
23
  msgid "Argentine"
24
  msgstr ""
25
 
26
+ #: includes/class-wc-mercadopago-gateway.php:108
27
  msgid "Brazil"
28
  msgstr ""
29
 
30
+ #: includes/class-wc-mercadopago-gateway.php:109
31
  msgid "Colombia"
32
  msgstr ""
33
 
34
+ #: includes/class-wc-mercadopago-gateway.php:110
35
  msgid "Mexico"
36
  msgstr ""
37
 
38
+ #: includes/class-wc-mercadopago-gateway.php:111
39
+ msgid "Venezuela"
40
+ msgstr ""
41
+
42
+ #: includes/class-wc-mercadopago-gateway.php:112
43
  msgid "or"
44
  msgstr ""
45
 
46
+ #: includes/class-wc-mercadopago-gateway.php:113
47
+ msgid "Chile"
48
  msgstr ""
49
 
50
+ #: includes/class-wc-mercadopago-gateway.php:118
51
  msgid "Enable/Disable"
52
  msgstr ""
53
 
54
+ #: includes/class-wc-mercadopago-gateway.php:120
55
  msgid "Enable MercadoPago standard"
56
  msgstr ""
57
 
58
+ #: includes/class-wc-mercadopago-gateway.php:124
59
  msgid "Title"
60
  msgstr ""
61
 
62
+ #: includes/class-wc-mercadopago-gateway.php:126
63
  msgid "This controls the title which the user sees during checkout."
64
  msgstr ""
65
 
66
+ #: includes/class-wc-mercadopago-gateway.php:131
67
  msgid "Description"
68
  msgstr ""
69
 
70
+ #: includes/class-wc-mercadopago-gateway.php:133
71
  msgid "This controls the description which the user sees during checkout."
72
  msgstr ""
73
 
74
+ #: includes/class-wc-mercadopago-gateway.php:134
75
+ #: includes/class-wc-mercadopago-gateway.php:330
76
  msgid "Pay via MercadoPago"
77
  msgstr ""
78
 
79
+ #: includes/class-wc-mercadopago-gateway.php:137
80
  msgid "MercadoPago Client_id"
81
  msgstr ""
82
 
83
+ #: includes/class-wc-mercadopago-gateway.php:139
84
  msgid "Please enter your MercadoPago Client_id."
85
  msgstr ""
86
 
87
+ #: includes/class-wc-mercadopago-gateway.php:139
88
+ #: includes/class-wc-mercadopago-gateway.php:145
89
  msgid "You can to get this information in MercadoPago from %s."
90
  msgstr ""
91
 
92
+ #: includes/class-wc-mercadopago-gateway.php:143
93
  msgid "MercadoPago Client_secret"
94
  msgstr ""
95
 
96
+ #: includes/class-wc-mercadopago-gateway.php:145
97
  msgid "Please enter your MercadoPago Client_secret."
98
  msgstr ""
99
 
100
+ #: includes/class-wc-mercadopago-gateway.php:149
101
  msgid "Invoice Prefix"
102
  msgstr ""
103
 
104
+ #: includes/class-wc-mercadopago-gateway.php:151
105
  msgid ""
106
  "Please enter a prefix for your invoice numbers. If you use your MercadoPago "
107
  "account for multiple stores ensure this prefix is unqiue as MercadoPago "
108
  "will not allow orders with the same invoice number."
109
  msgstr ""
110
 
111
+ #: includes/class-wc-mercadopago-gateway.php:156
112
  msgid "Integration method"
113
  msgstr ""
114
 
115
+ #: includes/class-wc-mercadopago-gateway.php:158
116
  msgid ""
117
  "Choose how the customer will interact with the MercadoPago. Modal Window "
118
  "(Inside your store) Redirect (Client goes to MercadoPago)."
119
  msgstr ""
120
 
121
+ #: includes/class-wc-mercadopago-gateway.php:162
122
  msgid "Modal Window"
123
  msgstr ""
124
 
125
+ #: includes/class-wc-mercadopago-gateway.php:163
126
  msgid "Redirect"
127
  msgstr ""
128
 
129
+ #: includes/class-wc-mercadopago-gateway.php:167
130
  msgid "Gateway Testing"
131
  msgstr ""
132
 
133
+ #: includes/class-wc-mercadopago-gateway.php:172
134
  msgid "MercadoPago Sandbox"
135
  msgstr ""
136
 
137
+ #: includes/class-wc-mercadopago-gateway.php:174
138
  msgid "Enable MercadoPago sandbox"
139
  msgstr ""
140
 
141
+ #: includes/class-wc-mercadopago-gateway.php:176
142
  msgid "MercadoPago sandbox can be used to test payments."
143
  msgstr ""
144
 
145
+ #: includes/class-wc-mercadopago-gateway.php:179
146
  msgid "Debug Log"
147
  msgstr ""
148
 
149
+ #: includes/class-wc-mercadopago-gateway.php:181
150
  msgid "Enable logging"
151
  msgstr ""
152
 
153
+ #: includes/class-wc-mercadopago-gateway.php:183
154
  msgid "Log MercadoPago events, such as API requests, inside %s"
155
  msgstr ""
156
 
157
+ #: includes/class-wc-mercadopago-gateway.php:244
158
  msgid "Order %s"
159
  msgstr ""
160
 
161
+ #: includes/class-wc-mercadopago-gateway.php:254
162
  msgid "Shipping via"
163
  msgstr ""
164
 
165
+ #: includes/class-wc-mercadopago-gateway.php:328
166
  msgid ""
167
  "Thank you for your order, please click the button below to pay with "
168
  "MercadoPago."
169
  msgstr ""
170
 
171
+ #: includes/class-wc-mercadopago-gateway.php:330
172
  msgid "Cancel order &amp; restore cart"
173
  msgstr ""
174
 
175
+ #: includes/class-wc-mercadopago-gateway.php:338
176
  msgid ""
177
  "An error has occurred while processing your payment, please try again. Or "
178
  "contact us for assistance."
179
  msgstr ""
180
 
181
+ #: includes/class-wc-mercadopago-gateway.php:340
182
  msgid "Click to try again"
183
  msgstr ""
184
 
185
+ #: includes/class-wc-mercadopago-gateway.php:520
186
+ msgid "Missing notification params."
187
  msgstr ""
188
 
189
+ #: includes/class-wc-mercadopago-gateway.php:520
190
+ msgid "MercadoPago Notification Handler"
191
+ msgstr ""
192
+
193
+ #: includes/class-wc-mercadopago-gateway.php:554
194
  msgid "MercadoPago Transaction ID"
195
  msgstr ""
196
 
197
+ #: includes/class-wc-mercadopago-gateway.php:561
198
  msgid "Payer email"
199
  msgstr ""
200
 
201
+ #: includes/class-wc-mercadopago-gateway.php:568
202
  msgid "Payment type"
203
  msgstr ""
204
 
205
+ #: includes/class-wc-mercadopago-gateway.php:574
206
  msgid "MercadoPago: Payment approved."
207
  msgstr ""
208
 
209
+ #: includes/class-wc-mercadopago-gateway.php:579
210
  msgid "MercadoPago: The user has not completed the payment process yet."
211
  msgstr ""
212
 
213
+ #: includes/class-wc-mercadopago-gateway.php:583
214
  msgid "MercadoPago: Payment under review."
215
  msgstr ""
216
 
217
+ #: includes/class-wc-mercadopago-gateway.php:587
218
  msgid "MercadoPago: The payment was declined. The user can try again."
219
  msgstr ""
220
 
221
+ #: includes/class-wc-mercadopago-gateway.php:591
222
  msgid "MercadoPago: The payment was returned to the user."
223
  msgstr ""
224
 
225
+ #: includes/class-wc-mercadopago-gateway.php:595
226
  msgid "MercadoPago: Payment canceled."
227
  msgstr ""
228
 
229
+ #: includes/class-wc-mercadopago-gateway.php:599
230
  msgid "MercadoPago: It started a dispute for payment."
231
  msgstr ""
232
 
233
+ #: includes/class-wc-mercadopago-gateway.php:630
234
  #: includes/class-wc-mercadopago-gateway.php:639
235
  #: includes/class-wc-mercadopago-gateway.php:648
 
236
  msgid "MercadoPago Disabled"
237
  msgstr ""
238
 
239
+ #: includes/class-wc-mercadopago-gateway.php:630
240
  msgid "You should inform your Client_id. %s"
241
  msgstr ""
242
 
243
+ #: includes/class-wc-mercadopago-gateway.php:630
244
  #: includes/class-wc-mercadopago-gateway.php:639
 
245
  msgid "Click here to configure!"
246
  msgstr ""
247
 
248
+ #: includes/class-wc-mercadopago-gateway.php:639
249
  msgid "You should inform your Client_secret. %s"
250
  msgstr ""
251
 
252
+ #: includes/class-wc-mercadopago-gateway.php:648
253
  msgid ""
254
  "Currency <code>%s</code> is not supported. Please make sure that you use "
255
  "one of the following supported currencies: ARS, BRL, COP, MXN, USD or VEF."
256
  msgstr ""
257
 
258
+ #: woocommerce-mercadopago.php:98
259
  msgid "WooCommerce MercadoPago Gateway depends on the last version of %s to work!"
260
  msgstr ""
261
 
262
+ #: woocommerce-mercadopago.php:98
263
  msgid "WooCommerce"
264
  msgstr ""
265
 
266
+ #: woocommerce-mercadopago.php:126 woocommerce-mercadopago.php:128
267
+ msgid "Settings"
268
+ msgstr ""
269
+
270
  #. Plugin Name of the plugin/theme
271
  msgid "WooCommerce MercadoPago"
272
  msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://claudiosmweb.com/doacoes/
4
  Tags: woocommerce, mercadopago, payment
5
  Requires at least: 4.0
6
  Tested up to: 4.5
7
- Stable tag: 2.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -201,6 +201,11 @@ Entre em contato [clicando aqui](http://claudiosmweb.com/plugins/mercadopago-par
201
 
202
  == Changelog ==
203
 
 
 
 
 
 
204
  = 2.0.4 - 2016/06/22 =
205
 
206
  * Fixed `back_urls` parameter.
@@ -227,8 +232,7 @@ Entre em contato [clicando aqui](http://claudiosmweb.com/plugins/mercadopago-par
227
 
228
  == Upgrade Notice ==
229
 
230
- = 2.0.4 =
231
 
232
- * Fixed support for WooCommerce 2.6.
233
- * Added support for `notification_url`.
234
- * Fixed `back_urls` parameter.
4
  Tags: woocommerce, mercadopago, payment
5
  Requires at least: 4.0
6
  Tested up to: 4.5
7
+ Stable tag: 2.0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
201
 
202
  == Changelog ==
203
 
204
+ = 2.0.5 - 2016/07/04 =
205
+
206
+ * Improved Payment Notification handler.
207
+ * Added full support for Chile in the settings.
208
+
209
  = 2.0.4 - 2016/06/22 =
210
 
211
  * Fixed `back_urls` parameter.
232
 
233
  == Upgrade Notice ==
234
 
235
+ = 2.0.5 =
236
 
237
+ * Improved Payment Notification handler.
238
+ * Added full support for Chile in the settings.
 
woocommerce-mercadopago.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: MercadoPago gateway for Woocommerce.
6
  * Author: Claudio Sanches
7
  * Author URI: http://claudiosmweb.com/
8
- * Version: 2.0.4
9
  * License: GPLv2 or later
10
  * Text Domain: woocommerce-mercadopago
11
  * Domain Path: /languages/
@@ -27,7 +27,7 @@ class WC_MercadoPago {
27
  *
28
  * @var string
29
  */
30
- const VERSION = '2.0.4';
31
 
32
  /**
33
  * Instance of this class.
@@ -49,6 +49,7 @@ class WC_MercadoPago {
49
  include_once 'includes/class-wc-mercadopago-gateway.php';
50
 
51
  add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway' ) );
 
52
  } else {
53
  add_action( 'admin_notices', array( $this, 'woocommerce_missing_notice' ) );
54
  }
@@ -70,13 +71,8 @@ class WC_MercadoPago {
70
 
71
  /**
72
  * Load the plugin text domain for translation.
73
- *
74
- * @return void
75
  */
76
  public function load_plugin_textdomain() {
77
- $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-mercadopago' );
78
-
79
- load_textdomain( 'woocommerce-mercadopago', trailingslashit( WP_LANG_DIR ) . 'woocommerce-mercadopago/woocommerce-mercadopago-' . $locale . '.mo' );
80
  load_plugin_textdomain( 'woocommerce-mercadopago', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
81
  }
82
 
@@ -99,7 +95,7 @@ class WC_MercadoPago {
99
  * @return string
100
  */
101
  public function woocommerce_missing_notice() {
102
- echo '<div class="error"><p>' . sprintf( __( 'WooCommerce MercadoPago Gateway depends on the last version of %s to work!', 'woocommerce-mercadopago' ), '<a href="http://wordpress.org/extend/plugins/woocommerce/">' . __( 'WooCommerce', 'woocommerce-mercadopago' ) . '</a>' ) . '</p></div>';
103
  }
104
 
105
  /**
@@ -115,21 +111,40 @@ class WC_MercadoPago {
115
  return $woocommerce;
116
  }
117
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  }
119
 
120
- add_action( 'plugins_loaded', array( 'WC_MercadoPago', 'get_instance' ), 0 );
121
 
122
  /**
123
  * Adds support to legacy IPN.
124
- *
125
- * @return void
126
  */
127
  function wcmercadopago_legacy_ipn() {
128
  if ( isset( $_GET['topic'] ) && ! isset( $_GET['wc-api'] ) ) {
129
- $woocommerce = WC_MercadoPago::woocommerce_instance();
130
- $woocommerce->payment_gateways();
 
131
 
132
- do_action( 'woocommerce_api_wc_mercadopago_gateway' );
 
133
  }
134
  }
135
 
5
  * Description: MercadoPago gateway for Woocommerce.
6
  * Author: Claudio Sanches
7
  * Author URI: http://claudiosmweb.com/
8
+ * Version: 2.0.5
9
  * License: GPLv2 or later
10
  * Text Domain: woocommerce-mercadopago
11
  * Domain Path: /languages/
27
  *
28
  * @var string
29
  */
30
+ const VERSION = '2.0.5';
31
 
32
  /**
33
  * Instance of this class.
49
  include_once 'includes/class-wc-mercadopago-gateway.php';
50
 
51
  add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway' ) );
52
+ add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
53
  } else {
54
  add_action( 'admin_notices', array( $this, 'woocommerce_missing_notice' ) );
55
  }
71
 
72
  /**
73
  * Load the plugin text domain for translation.
 
 
74
  */
75
  public function load_plugin_textdomain() {
 
 
 
76
  load_plugin_textdomain( 'woocommerce-mercadopago', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
77
  }
78
 
95
  * @return string
96
  */
97
  public function woocommerce_missing_notice() {
98
+ echo '<div class="error"><p>' . sprintf( __( 'WooCommerce MercadoPago Gateway depends on the last version of %s to work!', 'woocommerce-mercadopago' ), '<a href="http://wordpress.org/plugins/woocommerce/">' . __( 'WooCommerce', 'woocommerce-mercadopago' ) . '</a>' ) . '</p></div>';
99
  }
100
 
101
  /**
111
  return $woocommerce;
112
  }
113
  }
114
+
115
+ /**
116
+ * Action links.
117
+ *
118
+ * @param array $links Action links.
119
+ *
120
+ * @return array
121
+ */
122
+ public function plugin_action_links( $links ) {
123
+ $plugin_links = array();
124
+
125
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
126
+ $plugin_links[] = '<a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=mercadopago' ) ) . '">' . __( 'Settings', 'woocommerce-mercadopago' ) . '</a>';
127
+ } else {
128
+ $plugin_links[] = '<a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=wc_mercadopago_gateway' ) ) . '">' . __( 'Settings', 'woocommerce-mercadopago' ) . '</a>';
129
+ }
130
+
131
+ return array_merge( $plugin_links, $links );
132
+ }
133
  }
134
 
135
+ add_action( 'plugins_loaded', array( 'WC_MercadoPago', 'get_instance' ) );
136
 
137
  /**
138
  * Adds support to legacy IPN.
 
 
139
  */
140
  function wcmercadopago_legacy_ipn() {
141
  if ( isset( $_GET['topic'] ) && ! isset( $_GET['wc-api'] ) ) {
142
+ if ( isset( $_SERVER['REQUEST_URI'] ) && false === strpos( $_SERVER['REQUEST_URI'], 'wc-api' ) ) {
143
+ $woocommerce = WC_MercadoPago::woocommerce_instance();
144
+ $woocommerce->payment_gateways();
145
 
146
+ do_action( 'woocommerce_api_wc_mercadopago_gateway' );
147
+ }
148
  }
149
  }
150