Skip to content

Commit

Permalink
fix(preference): 🐛 fixed name of webhook parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lira committed Aug 12, 2021
1 parent 3b99c08 commit a24d344
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions includes/module/class-wc-woomercadopago-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,9 @@ public static function is_mobile() {
*/
public static function get_notification_type( $notification_type ) {
$types['WC_WooMercadoPago_Basic_Gateway'] = 'ipn';
$types['WC_WooMercadoPago_Custom_Gateway'] = 'webhook';
$types['WC_WooMercadoPago_Pix_Gateway'] = 'webhook';
$types['WC_WooMercadoPago_Ticket_Gateway'] = 'webhook';
$types['WC_WooMercadoPago_Custom_Gateway'] = 'webhooks';
$types['WC_WooMercadoPago_Pix_Gateway'] = 'webhooks';
$types['WC_WooMercadoPago_Ticket_Gateway'] = 'webhooks';
return $types[$notification_type];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public function shipments_receiver_address() {
public function get_notification_type( $notification_url, $notification_class ) {
$type = WC_WooMercadoPago_Module::get_notification_type($notification_class);
$url_join_character = preg_match('#/wc-api/#', $notification_url) ? '?' : '&';
return sprintf('%s%ssource_new=%s', $notification_url, $url_join_character, $type);
return sprintf('%s%ssource_news=%s', $notification_url, $url_join_character, $type);
}

/**
Expand Down

0 comments on commit a24d344

Please sign in to comment.