diff --git a/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXO.php b/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXO.php index 5d46435d2..a2f1dbc22 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXO.php +++ b/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXO.php @@ -104,7 +104,7 @@ class OXXO { ) { $payer_action = $order->get_meta( 'ppcp_oxxo_payer_action' ) ?? ''; if ( $payer_action ) { - echo '
'; + echo '' . esc_html__( 'See OXXO voucher', 'woocommerce-paypal-payments' ) . '
'; } } }, @@ -138,7 +138,7 @@ class OXXO { 'ppcp_oxxo_payer_action', __( 'OXXO Voucher/Ticket', 'woocommerce-paypal-payments' ), function() use ( $payer_action ) { - echo ''; + echo '' . esc_html__( 'See OXXO voucher', 'woocommerce-paypal-payments' ) . '
'; }, $post_type, 'side', @@ -156,7 +156,7 @@ class OXXO { if ( $order->get_payment_method() === OXXOGateway::ID ) { $payer_action = $order->get_meta( 'ppcp_oxxo_payer_action' ); if ( $payer_action ) { - echo ''; + echo '' . esc_html__( 'See OXXO voucher', 'woocommerce-paypal-payments' ) . '
'; } } } diff --git a/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXOEndpoint.php b/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXOEndpoint.php index 0d6e4fc3c..64d8e713f 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXOEndpoint.php +++ b/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXOEndpoint.php @@ -140,6 +140,9 @@ class OXXOEndpoint implements EndpointInterface { $this->logger->error( $error ); wc_add_notice( $error, 'error' ); + + wp_send_json_error( 'Could not get OXXO payer action.' ); + return false; } WC()->session->set( 'ppcp_payer_action', $payer_action ); diff --git a/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXOGateway.php b/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXOGateway.php index d230bd4cb..a04ea2d91 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXOGateway.php +++ b/modules/ppcp-wc-gateway/src/Gateway/OXXO/OXXOGateway.php @@ -70,9 +70,8 @@ class OXXOGateway extends WC_Payment_Gateway { $this->method_title = __( 'OXXO', 'woocommerce-paypal-payments' ); $this->method_description = __( 'OXXO is a Mexican chain of convenience stores.', 'woocommerce-paypal-payments' ); - $gateway_settings = get_option( 'woocommerce_ppcp-oxxo-gateway_settings' ); - $this->title = $gateway_settings['title'] ?? $this->method_title; - $this->description = $gateway_settings['description'] ?? __( 'OXXO allows you to pay bills and online purchases in-store with cash.', 'woocommerce-paypal-payments' ); + $this->title = $this->get_option( 'title' ) ?? $this->method_title; + $this->description = $this->get_option( 'description' ) ?? __( 'OXXO allows you to pay bills and online purchases in-store with cash.', 'woocommerce-paypal-payments' ); $this->init_form_fields(); $this->init_settings(); diff --git a/modules/ppcp-webhooks/src/Handler/PaymentCapturePending.php b/modules/ppcp-webhooks/src/Handler/PaymentCapturePending.php index 1467e663f..d3b711f08 100644 --- a/modules/ppcp-webhooks/src/Handler/PaymentCapturePending.php +++ b/modules/ppcp-webhooks/src/Handler/PaymentCapturePending.php @@ -101,10 +101,10 @@ class PaymentCapturePending implements RequestHandler { $wc_order = wc_get_order( $order_id ); if ( ! is_a( $wc_order, \WC_Order::class ) ) { $message = sprintf( - // translators: %s is the PayPal refund Id. - __( 'Order for PayPal refund %s not found.', 'woocommerce-paypal-payments' ), + 'Order for PayPal refund %s not found.', $request['resource'] !== null && isset( $request['resource']['id'] ) ? $request['resource']['id'] : '' ); + $this->logger->log( 'warning', $message,