Plugin Directory

Changeset 3395304


Ignore:
Timestamp:
11/13/2025 07:51:10 PM (7 weeks ago)
Author:
PerfectSolution
Message:

Update trunk/ - 7.5.0

Location:
woocommerce-quickpay
Files:
4 added
4 deleted
106 edited
1 copied

Legend:

Unmodified
Added
Removed
  • woocommerce-quickpay/tags/7.5.0/README.txt

    r3394934 r3395304  
    22Contributors: PerfectSolution
    33Tags: gateway, payment, quickpay, woocommerce, subscriptions
    4 Requires at least: 4.0.0
    5 Tested up to: 6.5
    6 Stable tag: trunk
     4Requires at least: 6.7
     5Tested up to: 6.8
     6Stable tag: 7.5.0
    77License: GPLv2
    8 License URI: http://www.gnu.org/licenses/gpl-2.0.html
     8License URI: https://www.gnu.org/licenses/gpl-2.0.html
    99
    1010Integrates your Quickpay payment gateway into your WooCommerce installation.
     
    27273. If WooCommerce Subscriptions is used, the required minimum version is >= 5.0
    2828
     29== External services ==
     30
     31This plugin uses the Quickpay API which is necessary to process payments in your store.
     32
     33The information sent to Quickpay is based on the information stored in your WooCommerce store and can be adjusted
     34in the plugin settings, but transaction details may include order information and customer details.
     35
     36Link to Quickpay terms of service: https://quickpay.net/terms-of-service/
     37
    2938== Changelog ==
     39= 7.5.0 =
     40* Fik: Changed plugin display name to Quickpay for WooCommerce to comply with the WooCommerce trademark and WP guidelines.
     41* Fix: bumped tested with WC version to 10.5
     42* Fix: Improved sanitizing of various input fields
     43* Fix: Added nonce checks on ajax endpoints
     44* Fix: Added 'External services' section to readme
     45* Fix: Changed text-domain to 'woocommerce-quickpay'
     46
    3047= 7.4.0 =
    3148* Fix: Subscription switching was not always creating a subscription payment when upgrading from a free subscription to a paid variant where no previous payments have been made.
  • woocommerce-quickpay/tags/7.5.0/assets/javascript/backend.js

    r2924617 r3395304  
    6767            url: quickpayBackend.ajax_url + 'admin/manage-payment',
    6868            dataType: 'json',
    69             data: $.extend({}, {post: this.postID}, dataObject),
     69            data: $.extend({}, {post: this.postID, '_wpnonce': quickpayBackend.nonce}, dataObject),
    7070            beforeSend: $.proxy(this.showLoader, this, true),
    7171            success: function () {
     
    104104
    105105    QuickPayCheckAPIStatus.prototype.pingAPI = function () {
    106         $.post(quickpayBackend.ajax_url + 'admin/settings/ping', {api_key: this.apiSettingsField.val()}, $.proxy(function (response) {
     106        $.post(quickpayBackend.ajax_url + 'admin/settings/ping', {api_key: this.apiSettingsField.val(), '_wpnonce': quickpayBackend.nonce}, $.proxy(function (response) {
    107107            if (response.success === true) {
    108108                this.indicator.addClass('ok').removeClass('error');
     
    142142            e.preventDefault();
    143143            emptyLogsButton.prop('disabled', true);
    144             $.getJSON(quickpayBackend.ajax_url + 'admin/settings/empty-logs', function (response) {
     144            $.getJSON(quickpayBackend.ajax_url + 'admin/settings/empty-logs', {'_wpnonce': quickpayBackend.nonce}, function (response) {
    145145                wcqpInsertAjaxResponseMessage(response);
    146146                emptyLogsButton.prop('disabled', false);
     
    152152            e.preventDefault();
    153153            flushCacheButton.prop('disabled', true);
    154             $.getJSON(quickpayBackend.ajax_url + 'admin/settings/clear-cache', function (response) {
     154            $.getJSON(quickpayBackend.ajax_url + 'admin/settings/clear-cache', {'_wpnonce': quickpayBackend.nonce}, function (response) {
    155155                wcqpInsertAjaxResponseMessage(response);
    156156                flushCacheButton.prop('disabled', false);
     
    183183            if (!self.refresh.hasClass('ok')) {
    184184                self.refresh.addClass('is-loading');
    185                 $.post(quickpayBackend.ajax_url + 'admin/settings/private-key', {api_key: self.apiKeyField.val()}, function (response) {
     185                $.post(quickpayBackend.ajax_url + 'admin/settings/private-key', {api_key: self.apiKeyField.val(), '_wpnonce': quickpayBackend.nonce}, function (response) {
    186186                    if (response.success === true) {
    187187                        self.field.val(response.data.private_key);
  • woocommerce-quickpay/tags/7.5.0/classes/api/woocommerce-quickpay-api-payment.php

    r2924617 r3395304  
    5757        }
    5858
    59         $request = $this->post( sprintf( '%d/%s', $transaction_id, "capture" ), [ 'amount' => WC_QuickPay_Helper::price_multiply( $amount, $order->get_currency() ) ], true );
     59        $request = $this->post( sprintf( '%1$d/%2$s', (int) $transaction_id, "capture" ), [ 'amount' => WC_QuickPay_Helper::price_multiply( $amount, $order->get_currency() ) ], true );
    6060
    6161        $this->check_last_operation_of_type_with_location_fallback( 'capture', $order, $request );
     
    8787
    8888            if ( empty( $_action ) ) {
    89                 throw new QuickPay_Exception( sprintf( '%s inconclusive. Response from location header is empty.', ucfirst( $action ) ) );
     89                throw new QuickPay_Exception( wp_kses_post(sprintf( '%s inconclusive. Response from location header is empty.', ucfirst( $action ) )) );
    9090            }
    9191        }
    9292
    9393        if ( ! $follow_location && ! $_action ) {
    94             throw new QuickPay_Exception( sprintf( 'No %s operation or location found: %s', $action, json_encode( $this->resource_data ) ) );
     94            throw new QuickPay_Exception( wp_kses_post(sprintf( 'No %s operation or location found: %s', $action, json_encode( $this->resource_data ) )) );
    9595        }
    9696
    9797
    9898        if ( $_action->qp_status_code > 20200 ) {
    99             throw new QuickPay_Capture_Exception( sprintf( '%s payment on order #%s failed. Message: %s', ucfirst( $action ), $order->get_id(), $_action->qp_status_msg ) );
     99            throw new QuickPay_Capture_Exception( wp_kses_post(sprintf( '%s payment on order #%s failed. Message: %s', ucfirst( $action ), $order->get_id(), $_action->qp_status_msg ) ));
    100100        }
    101101    }
     
    115115     */
    116116    public function cancel( $transaction_id ): void {
    117         $this->post( sprintf( '%d/%s', $transaction_id, "cancel" ) );
     117        $this->post( sprintf( '%1$d/%2$s', (int) $transaction_id, "cancel" ) );
    118118    }
    119119
     
    147147        $product = reset( $basket_items );
    148148
    149         $request = $this->post( sprintf( '%d/%s', $transaction_id, "refund" ), [
     149        $request = $this->post( sprintf( '%1$d/%2$s', $transaction_id, "refund" ), [
    150150            'amount'   => WC_QuickPay_Helper::price_multiply( $amount, $order->get_currency() ),
    151151            'vat_rate' => $product['vat_rate'],
  • woocommerce-quickpay/tags/7.5.0/classes/api/woocommerce-quickpay-api-subscription.php

    r2924617 r3395304  
    5252        $order_number = WC_QuickPay_Order_Payments_Utils::get_order_number_for_api( $order, true );
    5353
    54         $request_url = sprintf( '%d/%s', $subscription_id, "recurring" );
     54        $request_url = sprintf( '%1$d/%2$s', (int) $subscription_id, "recurring" );
    5555
    5656        $request_data = apply_filters( 'woocommerce_quickpay_create_recurring_payment_data', [
     
    8282     */
    8383    public function cancel( int $subscription_id ): void {
    84         $this->post( sprintf( '%d/%s', $subscription_id, "cancel" ) );
     84        $this->post( sprintf( '%1$d/%2$s', $subscription_id, "cancel" ) );
    8585    }
    8686
  • woocommerce-quickpay/tags/7.5.0/classes/api/woocommerce-quickpay-api-transaction.php

    r2924617 r3395304  
    8282
    8383        if ( wc_string_to_bool( $last_operation->pending ) ) {
    84             $last_operation->type = __( 'Pending - check your QuickPay manager', 'woo-quickpay' );
     84            $last_operation->type = esc_html__( 'Pending - check your QuickPay manager', 'woocommerce-quickpay' );
    8585        }
    8686
     
    395395
    396396        if ( empty( $transaction_id ) ) {
    397             throw new QuickPay_Exception( __( 'Transaction ID cannot be empty', 'woo-quickpay' ) );
     397            throw new QuickPay_Exception( esc_html__( 'Transaction ID cannot be empty', 'woocommerce-quickpay' ) );
    398398        }
    399399
  • woocommerce-quickpay/tags/7.5.0/classes/api/woocommerce-quickpay-api.php

    r2924617 r3395304  
    235235                throw new QuickPay_API_Exception( $this->resource_data->message, $response_code, null, $curl_request_url, $request_form_data, $response_data );
    236236            } else {
    237                 throw new QuickPay_API_Exception( (string) json_encode( $this->resource_data ), $response_code, null, $curl_request_url, $request_form_data, $response_data );
     237                throw new QuickPay_API_Exception( (string) wp_json_encode( $this->resource_data ), $response_code, null, $curl_request_url, $request_form_data, $response_data );
    238238            }
    239239
  • woocommerce-quickpay/tags/7.5.0/classes/emails/woocommerce-quickpay-payment-link-email.php

    r2924617 r3395304  
    1111        $this->customer_email = true;
    1212        $this->id             = 'woocommerce_quickpay_payment_link';
    13         $this->title          = __( 'Payment link created', 'woo-quickpay' );
    14         $this->description    = __( 'This e-mail is sent upon manual payment link creation by a shop admin.', 'woo-quickpay' );
     13        $this->title          = esc_html__( 'Payment link created', 'woocommerce-quickpay' );
     14        $this->description    = esc_html__( 'This e-mail is sent upon manual payment link creation by a shop admin.', 'woocommerce-quickpay' );
    1515        $this->template_html  = 'emails/customer-quickpay-payment-link.php';
    1616        $this->template_plain = 'emails/plain/customer-quickpay-payment-link.php';
     
    9191        $this->form_fields = [
    9292            'enabled'    => [
    93                 'title'   => __( 'Enable/Disable', 'woocommerce' ),
     93                'title'   => esc_html__( 'Enable/Disable', 'woocommerce-quickpay' ),
    9494                'type'    => 'checkbox',
    95                 'label'   => __( 'Enable this email notification', 'woocommerce' ),
     95                'label'   => esc_html__( 'Enable this email notification', 'woocommerce-quickpay' ),
    9696                'default' => 'yes',
    9797            ],
    9898            'subject'    => [
    99                 'title'       => __( 'Subject', 'woocommerce' ),
     99                'title'       => esc_html__( 'Subject', 'woocommerce-quickpay' ),
    100100                'type'        => 'text',
    101101                'desc_tip'    => true,
    102102                /* translators: %s: list of placeholders */
    103                 'description' => sprintf( __( 'Available placeholders: %s', 'woocommerce' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
     103                'description' => sprintf( esc_html__( 'Available placeholders: %s', 'woocommerce-quickpay' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
    104104                'placeholder' => $this->get_default_subject(),
    105105                'default'     => '',
    106106            ],
    107107            'heading'    => [
    108                 'title'       => __( 'Email heading', 'woocommerce' ),
     108                'title'       => esc_html__( 'Email heading', 'woocommerce-quickpay' ),
    109109                'type'        => 'text',
    110110                'desc_tip'    => true,
    111111                /* translators: %s: list of placeholders */
    112                 'description' => sprintf( __( 'Available placeholders: %s', 'woocommerce' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
     112                'description' => sprintf( esc_html__( 'Available placeholders: %s', 'woocommerce-quickpay' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
    113113                'placeholder' => $this->get_default_heading(),
    114114                'default'     => '',
    115115            ],
    116116            'email_type' => [
    117                 'title'       => __( 'Email type', 'woocommerce' ),
     117                'title'       => esc_html__( 'Email type', 'woocommerce-quickpay' ),
    118118                'type'        => 'select',
    119                 'description' => __( 'Choose which format of email to send.', 'woocommerce' ),
     119                'description' => esc_html__( 'Choose which format of email to send.', 'woocommerce-quickpay' ),
    120120                'default'     => 'html',
    121121                'class'       => 'email_type wc-enhanced-select',
     
    133133     */
    134134    public function get_default_subject() {
    135         return __( 'Payment link for your order ({order_number})', 'woo-quickpay' );
     135        return esc_html__( 'Payment link for your order ({order_number})', 'woocommerce-quickpay' );
    136136    }
    137137
     
    143143     */
    144144    public function get_default_heading() {
    145         return __( 'This is your payment link', 'woo-quickpay' );
     145        return esc_html__( 'This is your payment link', 'woocommerce-quickpay' );
    146146    }
    147147}
  • woocommerce-quickpay/tags/7.5.0/classes/instances/anyday.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => sprintf( __( 'Enable %s payment', 'woo-quickpay' ), 'Anyday' ),
     37                /* translators: 1: name of the payment gateway */
     38                'label'   => sprintf( esc_html__( 'Enable %s payment', 'woocommerce-quickpay' ), 'Anyday' ),
    3839                'default' => 'no'
    3940            ],
    4041            '_Shop_setup' => [
    4142                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     43                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4344            ],
    4445            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     46                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4647                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Anyday', 'woo-quickpay' )
     48                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     49                'default'     => esc_html__( 'Anyday', 'woocommerce-quickpay' )
    4950            ],
    5051            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     52                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5253                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => sprintf( __( 'Pay with %s', 'woo-quickpay' ), 'Anyday' )
     54                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     55                /* translators: 1: name of the payment gateway */
     56                'default'     => sprintf( esc_html__( 'Pay with %s', 'woocommerce-quickpay' ), 'Anyday' )
    5557            ],
    5658        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/apple-pay.php

    r3095043 r3395304  
    3434        $this->form_fields = [
    3535            'enabled'     => [
    36                 'title'   => __( 'Enable', 'woo-quickpay' ),
     36                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3737                'type'    => 'checkbox',
    38                 'label'   => sprintf( __( 'Enable %s payment', 'woo-quickpay' ), 'Apple Pay' ),
     38                /* translators: 1: name of the payment gateway  */
     39                'label'   => sprintf( esc_html__( 'Enable %s payment', 'woocommerce-quickpay' ), 'Apple Pay' ),
    3940                'default' => 'no',
    40                 'description' => sprintf(__( 'Works only in %s.', 'woo-quickpay' ), 'Safari' )
     41                /* translators: 1: name of the browser */
     42                'description' => sprintf(esc_html__( 'Works only in %s.', 'woocommerce-quickpay' ), 'Safari' )
    4143            ],
    4244            '_Shop_setup' => [
    4345                'type'  => 'title',
    44                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     46                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4547            ],
    4648            'title'       => [
    47                 'title'       => __( 'Title', 'woo-quickpay' ),
     49                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4850                'type'        => 'text',
    49                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    50                 'default'     => __( 'Apple Pay', 'woo-quickpay' )
     51                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     52                'default'     => esc_html__( 'Apple Pay', 'woocommerce-quickpay' )
    5153            ],
    5254            'description' => [
    53                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     55                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5456                'type'        => 'textarea',
    55                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    56                 'default'     => sprintf( __( 'Pay with %s', 'woo-quickpay' ), 'Apple Pay' )
     57                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     58                /* translators: 1: name of the payment gateway */
     59                'default'     => sprintf( esc_html__( 'Pay with %s', 'woocommerce-quickpay' ), 'Apple Pay' )
    5760            ],
    5861        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/fbg1886.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Forbrugsforeningen payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Forbrugsforeningen payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Forbrugsforeningen af 1886', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Forbrugsforeningen af 1886', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Forbrugsforeningen af 1886', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Forbrugsforeningen af 1886', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/google-pay.php

    r3095043 r3395304  
    4949        $this->form_fields = [
    5050            'enabled'     => [
    51                 'title'       => __( 'Enable', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    5252                'type'        => 'checkbox',
    53                 'label'       => sprintf( __( 'Enable %s payment', 'woo-quickpay' ), 'Google Pay' ),
    54                 'description' => sprintf( __( 'Works only in %s.', 'woo-quickpay' ), 'Chrome' ),
     53                /* translators: 1: name of the payment gateway */
     54                'label'       => sprintf( esc_html__( 'Enable %s payment', 'woocommerce-quickpay' ), 'Google Pay' ),
     55                /* translators: 1: browser name */
     56                'description' => sprintf( esc_html__( 'Works only in %s.', 'woocommerce-quickpay' ), 'Chrome' ),
    5557                'default'     => 'no'
    5658            ],
    5759            '_Shop_setup' => [
    5860                'type'  => 'title',
    59                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     61                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    6062            ],
    6163            'title'       => [
    62                 'title'       => __( 'Title', 'woo-quickpay' ),
     64                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    6365                'type'        => 'text',
    64                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    65                 'default'     => __( 'Google Pay', 'woo-quickpay' )
     66                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     67                'default'     => esc_html__( 'Google Pay', 'woocommerce-quickpay' )
    6668            ],
    6769            'description' => [
    68                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     70                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    6971                'type'        => 'textarea',
    70                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    71                 'default'     => sprintf( __( 'Pay with %s', 'woo-quickpay' ), 'Google Pay' )
     72                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     73                /* translators: 1: name of the payment gateway */
     74                'default'     => sprintf( esc_html__( 'Pay with %s', 'woocommerce-quickpay' ), 'Google Pay' )
    7275            ],
    7376        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/ideal.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable iDEAL payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable iDEAL payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'iDEAL', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'iDEAL', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with iDEAL', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with iDEAL', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/instance.php

    r3095043 r3395304  
    5555        ];
    5656
     57        $allowed_html = [
     58            'a' => [
     59                'href' => [],
     60            ],
     61        ];
     62
    5763        $html = sprintf( "<p><small>Version: %s</small>", WCQP_VERSION );
    58         $html .= "<p>" . sprintf( __( 'Allows you to receive payments via %s', 'woo-quickpay' ), $this->method_title ) . "</p>";
    59         $html .= "<p>" . sprintf( __( 'This module has it\'s main configuration inside the \'QuickPay\' tab.', 'woo-quickpay' ), 's' ) . "</p>";
    60         $html .= "<p>" . sprintf( __( 'Click <a href="%s">here</a> to access the main configuration.', 'woo-quickpay' ), add_query_arg( $main_settings_args, admin_url( 'admin.php' ) ) ) . "</p>";
     64        /* translators: 1: Payment method title */
     65        $html .= "<p>" . sprintf( esc_html__( 'Allows you to receive payments via %s', 'woocommerce-quickpay' ), $this->method_title ) . "</p>";
     66        $html .= "<p>" . sprintf( esc_html__( 'This module has it\'s main configuration inside the \'QuickPay\' tab.', 'woocommerce-quickpay' ), 's' ) . "</p>";
     67        /* translators: 1:  Link to the main settings page */
     68        $html .= "<p>" . wp_kses( sprintf( __( 'Click <a href="%s">here</a> to access the main configuration.', 'woocommerce-quickpay' ), esc_url( add_query_arg( $main_settings_args, admin_url( 'admin.php' ) ) ) ), $allowed_html ) . "</p>";
    6169
    6270        $html .= get_parent_class( get_parent_class( get_parent_class( $this ) ) )::generate_settings_html( $form_fields, $echo );
    6371
    6472        if ( $echo ) {
    65             echo $html; // WPCS: XSS ok.
     73            echo wp_kses_post($html); // WPCS: XSS ok.
    6674        } else {
    6775            return $html;
  • woocommerce-quickpay/tags/7.5.0/classes/instances/klarna.php

    r3095043 r3395304  
    3434        $this->form_fields = [
    3535            'enabled' => [
    36                 'title' => __( 'Enable', 'woo-quickpay' ),
     36                'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3737                'type' => 'checkbox',
    38                 'label' => __( 'Enable Klarna payment', 'woo-quickpay' ),
     38                'label' => esc_html__( 'Enable Klarna payment', 'woocommerce-quickpay' ),
    3939                'default' => 'no'
    4040            ],
    4141            '_Shop_setup' => [
    4242                'type' => 'title',
    43                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     43                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4444            ],
    4545            'title' => [
    46                 'title' => __( 'Title', 'woo-quickpay' ),
     46                'title' => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4747                'type' => 'text',
    48                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    49                 'default' => __('Klarna', 'woo-quickpay')
     48                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     49                'default' => esc_html__('Klarna', 'woocommerce-quickpay')
    5050            ],
    5151            'description' => [
    52                 'title' => __( 'Customer Message', 'woo-quickpay' ),
     52                'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5353                'type' => 'textarea',
    54                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    55                 'default' => __('Pay with Klarna', 'woo-quickpay')
     54                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     55                'default' => esc_html__('Pay with Klarna', 'woocommerce-quickpay')
    5656            ],
    5757        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/mobilepay-subscriptions.php

    r3095043 r3395304  
    6565            // Check if the subscription has the allowed status
    6666            if ( $subscription->has_status( $allowed_transition_from ) ) {
    67                 $note = ! empty( $operation->aq_status_msg ) ? $operation->aq_status_msg : __( 'Subscription transaction has been cancelled by merchant or customer', 'woo-quickpay' );
     67                $note = ! empty( $operation->aq_status_msg ) ? $operation->aq_status_msg : esc_html__( 'Subscription transaction has been cancelled by merchant or customer', 'woocommerce-quickpay' );
    6868                // If the setting has been set to cancelled, we will run the cancel_order method on the subscription to
    6969                // take advantage of the built-in pending-cancel/cancelled functionality.
     
    149149        $this->form_fields = [
    150150            'enabled'                             => [
    151                 'title'   => __( 'Enable', 'woo-quickpay' ),
     151                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    152152                'type'    => 'checkbox',
    153                 'label'   => sprintf( __( 'Enable %s payment', 'woo-quickpay' ), $this->get_sanitized_method_title() ),
     153                /* translators: 1: name of the payment gateway */
     154                'label'   => sprintf( esc_html__( 'Enable %s payment', 'woocommerce-quickpay' ), $this->get_sanitized_method_title() ),
    154155                'default' => 'no'
    155156            ],
    156157            '_Shop_setup'                         => [
    157158                'type'  => 'title',
    158                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     159                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    159160            ],
    160161            'title'                               => [
    161                 'title'       => __( 'Title', 'woo-quickpay' ),
     162                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    162163                'type'        => 'text',
    163                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
     164                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
    164165                'default'     => $this->get_sanitized_method_title(),
    165166            ],
    166167            'description'                         => [
    167                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     168                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    168169                'type'        => 'textarea',
    169                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    170                 'default'     => sprintf( __( 'Pay with %s', 'woo-quickpay' ), $this->get_sanitized_method_title() ),
     170                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     171                /* translators: 1: name of the payment gateway */
     172                'default'     => sprintf( esc_html__( 'Pay with %s', 'woocommerce-quickpay' ), $this->get_sanitized_method_title() ),
    171173            ],
    172174            [
     
    175177            ],
    176178            'checkout_instant_activation'         => [
    177                 'title'       => __( 'Activate subscriptions immediately.', 'woo-quickpay' ),
     179                'title'       => esc_html__( 'Activate subscriptions immediately.', 'woocommerce-quickpay' ),
    178180                'type'        => 'checkbox',
    179                 'label'       => __( 'Enable', 'woo-quickpay' ),
     181                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    180182                'default'     => 'no',
    181                 'description' => __( 'Activates the subscription after the customer authorizes an agreement. <strong>Not suitable for membership pages selling virtual products</strong> as the first payment might take up to 48 hours to either succeed or fail. Read more <a href="https://learn.quickpay.net/helpdesk/da/articles/payment-methods/mobilepay-subscriptions/#oprettelse-af-abonnement" target="_blank">here</a>', 'woo-quickpay' ),
     183                'description' => esc_html__( 'Activates the subscription after the customer authorizes an agreement. <strong>Not suitable for membership pages selling virtual products</strong> as the first payment might take up to 48 hours to either succeed or fail. Read more <a href="https://learn.quickpay.net/helpdesk/da/articles/payment-methods/mobilepay-subscriptions/#oprettelse-af-abonnement" target="_blank">here</a>', 'woocommerce-quickpay' ),
    182184            ],
    183185            'checkout_prefill_phone_number'       => [
    184                 'title'       => __( 'Pre-fill phone number', 'woo-quickpay' ),
     186                'title'       => esc_html__( 'Pre-fill phone number', 'woocommerce-quickpay' ),
    185187                'type'        => 'checkbox',
    186                 'label'       => __( 'Enable', 'woo-quickpay' ),
     188                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    187189                'default'     => 'yes',
    188                 'description' => __( 'When enabled the customer\'s phone number will be used on the MobilePay payment page.', 'woo-quickpay' ),
     190                'description' => esc_html__( 'When enabled the customer\'s phone number will be used on the MobilePay payment page.', 'woocommerce-quickpay' ),
    189191            ],
    190192            [
     
    193195            ],
    194196            'renewal_keep_active'                 => [
    195                 'title'       => __( 'Keep subscription active', 'woo-quickpay' ),
     197                'title'       => esc_html__( 'Keep subscription active', 'woocommerce-quickpay' ),
    196198                'type'        => 'checkbox',
    197                 'label'       => __( 'Enable', 'woo-quickpay' ),
     199                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    198200                'default'     => 'no',
    199                 'description' => __( 'When enabled the subscription will automatically be activated after scheduling the renewal payment. If the payment fails the subscription will be put on-hold.', 'woo-quickpay' ),
     201                'description' => esc_html__( 'When enabled the subscription will automatically be activated after scheduling the renewal payment. If the payment fails the subscription will be put on-hold.', 'woocommerce-quickpay' ),
    200202            ],
    201203            [
    202204                'type'  => 'title',
    203                 'title' => __( 'Agreements', 'woo-quickpay' )
     205                'title' => esc_html__( 'Agreements', 'woocommerce-quickpay' )
    204206            ],
    205207            'mps_transaction_cancellation_status' => [
    206                 'title'             => __( 'Cancelled agreements status', 'woo-quickpay' ),
     208                'title'             => esc_html__( 'Cancelled agreements status', 'woocommerce-quickpay' ),
    207209                'type'              => 'select',
    208210                'class'             => 'wc-enhanced-select',
    209211                'css'               => 'width: 450px;',
    210212                'default'           => 'none',
    211                 'description'       => __( 'Changes subscription status in case of cancelled payment agreement from either the QuickPay manager or the customer\'s MobilePay app', 'woo-quickpay' ),
     213                'description'       => esc_html__( 'Changes subscription status in case of cancelled payment agreement from either the QuickPay manager or the customer\'s MobilePay app', 'woocommerce-quickpay' ),
    212214                'options'           => $this->get_mps_cancel_agreement_status_options(),
    213215                'custom_attributes' => [
    214                     'data-placeholder' => __( 'Select status', 'woo-quickpay' )
     216                    'data-placeholder' => esc_html__( 'Select status', 'woocommerce-quickpay' )
    215217                ]
    216218            ],
     
    220222    private function get_mps_cancel_agreement_status_options() {
    221223        return apply_filters( 'woocommerce_quickpay_mps_cancel_agreement_status_options', [
    222             'none'      => __( 'Do nothing', 'woo-quickpay' ),
     224            'none'      => esc_html__( 'Do nothing', 'woocommerce-quickpay' ),
    223225            'on-hold'   => wc_get_order_status_name( 'on-hold' ),
    224226            'cancelled' => wc_get_order_status_name( 'cancelled' ),
     
    287289        if ( empty( $data['due_date'] ) ) {
    288290            $data['auto_capture_at'] = wp_date( 'Y-m-d', strtotime( 'now + 2 days' ), apply_filters( 'woocommerce_quickpay_mps_timezone', null, $data, $order, $subscription_id ) );
    289             $data['description']     = sprintf( __( 'Payment of #%s', 'woo-quickpay' ), $order->get_order_number() );
     291            /* translators: 1: the order number */
     292            $data['description']     = sprintf( esc_html__( 'Payment of #%s', 'woocommerce-quickpay' ), $order->get_order_number() );
    290293        }
    291294
     
    306309
    307310                if ( $instant_activation && ! $subscription->has_status( 'active' ) ) {
    308                     $subscription->update_status( 'active', __( "'Activate subscriptions immediately.' enabled. Activating subscription due to authorized MobilePay agreement", 'woo-quickpay' ) );
     311                    $subscription->update_status( 'active', esc_html__( "'Activate subscriptions immediately.' enabled. Activating subscription due to authorized MobilePay agreement", 'woocommerce-quickpay' ) );
    309312                    $subscription->save();
    310313                }
     
    355358                '_quickpay_transaction_id' => [
    356359                    'value' => WC_QuickPay_Order_Utils::get_transaction_id( $subscription ),
    357                     'label' => __( 'QuickPay Transaction ID', 'woo-quickpay' ),
     360                    'label' => esc_html__( 'QuickPay Transaction ID', 'woocommerce-quickpay' ),
    358361                ],
    359362            ],
  • woocommerce-quickpay/tags/7.5.0/classes/instances/mobilepay.php

    r3095043 r3395304  
    3232        $this->form_fields = [
    3333            'enabled'                    => [
    34                 'title'   => __( 'Enable', 'woo-quickpay' ),
     34                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3535                'type'    => 'checkbox',
    36                 'label'   => __( 'Enable MobilePay payment', 'woo-quickpay' ),
     36                'label'   => esc_html__( 'Enable MobilePay payment', 'woocommerce-quickpay' ),
    3737                'default' => 'no',
    3838            ],
    3939            '_Shop_setup'                => [
    4040                'type'  => 'title',
    41                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     41                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4242            ],
    4343            'title'                      => [
    44                 'title'       => __( 'Title', 'woo-quickpay' ),
     44                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4545                'type'        => 'text',
    46                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    47                 'default'     => __( 'MobilePay', 'woo-quickpay' ),
     46                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     47                'default'     => esc_html__( 'MobilePay', 'woocommerce-quickpay' ),
    4848            ],
    4949            'description'                => [
    50                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     50                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5151                'type'        => 'textarea',
    52                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    53                 'default'     => __( 'Pay with your mobile phone', 'woo-quickpay' ),
     52                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     53                'default'     => esc_html__( 'Pay with your mobile phone', 'woocommerce-quickpay' ),
    5454            ]
    5555        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/paypal.php

    r3095043 r3395304  
    3535        $this->form_fields = [
    3636            'enabled'     => [
    37                 'title'   => __( 'Enable', 'woo-quickpay' ),
     37                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3838                'type'    => 'checkbox',
    39                 'label'   => __( 'Enable PayPal payment', 'woo-quickpay' ),
     39                'label'   => esc_html__( 'Enable PayPal payment', 'woocommerce-quickpay' ),
    4040                'default' => 'no'
    4141            ],
    4242            '_Shop_setup' => [
    4343                'type'  => 'title',
    44                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     44                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4545            ],
    4646            'title'       => [
    47                 'title'       => __( 'Title', 'woo-quickpay' ),
     47                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4848                'type'        => 'text',
    49                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    50                 'default'     => __( 'PayPal', 'woo-quickpay' )
     49                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     50                'default'     => esc_html__( 'PayPal', 'woocommerce-quickpay' )
    5151            ],
    5252            'description' => [
    53                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     53                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5454                'type'        => 'textarea',
    55                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    56                 'default'     => __( 'Pay with PayPal', 'woo-quickpay' )
     55                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     56                'default'     => esc_html__( 'Pay with PayPal', 'woocommerce-quickpay' )
    5757            ],
    5858        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/quickpay-extra.php

    r3095043 r3395304  
    3939        $this->form_fields = [
    4040            'enabled'        => [
    41                 'title'   => __( 'Enable', 'woo-quickpay' ),
     41                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    4242                'type'    => 'checkbox',
    43                 'label'   => __( 'Enable Extra QuickPay gateway', 'woo-quickpay' ),
     43                'label'   => esc_html__( 'Enable Extra QuickPay gateway', 'woocommerce-quickpay' ),
    4444                'default' => 'no'
    4545            ],
    4646            '_Shop_setup'    => [
    4747                'type'  => 'title',
    48                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     48                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4949            ],
    5050            'title'          => [
    51                 'title'       => __( 'Title', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    5252                'type'        => 'text',
    53                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'QuickPay', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'QuickPay', 'woocommerce-quickpay' )
    5555            ],
    5656            'description'    => [
    57                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     57                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5858                'type'        => 'textarea',
    59                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    60                 'default'     => __( 'Pay', 'woo-quickpay' )
     59                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     60                'default'     => esc_html__( 'Pay', 'woocommerce-quickpay' )
    6161            ],
    6262            'cardtypelock'   => [
    63                 'title'       => __( 'Payment methods', 'woo-quickpay' ),
     63                'title'       => esc_html__( 'Payment methods', 'woocommerce-quickpay' ),
    6464                'type'        => 'text',
    65                 'description' => __( 'Default: creditcard. Type in the cards you wish to accept (comma separated). See the valid payment types here: <b>https://learn.quickpay.net/tech-talk/appendixes/payment-methods/#payment-methods</b>', 'woo-quickpay' ),
     65                'description' => esc_html__( 'Default: creditcard. Type in the cards you wish to accept (comma separated). See the valid payment types here: <b>https://learn.quickpay.net/tech-talk/appendixes/payment-methods/#payment-methods</b>', 'woocommerce-quickpay' ),
    6666                'default'     => 'creditcard',
    6767            ],
    6868            'quickpay_icons' => [
    69                 'title'             => __( 'Credit card icons', 'woo-quickpay' ),
     69                'title'             => esc_html__( 'Credit card icons', 'woocommerce-quickpay' ),
    7070                'type'              => 'multiselect',
    71                 'description'       => __( 'Choose the card icons you wish to show next to the QuickPay payment option in your shop.', 'woo-quickpay' ),
     71                'description'       => esc_html__( 'Choose the card icons you wish to show next to the QuickPay payment option in your shop.', 'woocommerce-quickpay' ),
    7272                'desc_tip'          => true,
    7373                'class'             => 'wc-enhanced-select',
    7474                'css'               => 'width: 450px;',
    7575                'custom_attributes' => [
    76                     'data-placeholder' => __( 'Select icons', 'woo-quickpay' )
     76                    'data-placeholder' => esc_html__( 'Select icons', 'woocommerce-quickpay' )
    7777                ],
    7878                'default'           => '',
  • woocommerce-quickpay/tags/7.5.0/classes/instances/resurs.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Resurs payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Resurs payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Resurs', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Resurs', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Resurs', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Resurs', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/sofort.php

    r3095043 r3395304  
    3434        $this->form_fields = [
    3535            'enabled'     => [
    36                 'title'   => __( 'Enable', 'woo-quickpay' ),
     36                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3737                'type'    => 'checkbox',
    38                 'label'   => __( 'Enable Sofort payment', 'woo-quickpay' ),
     38                'label'   => esc_html__( 'Enable Sofort payment', 'woocommerce-quickpay' ),
    3939                'default' => 'no'
    4040            ],
    4141            '_Shop_setup' => [
    4242                'type'  => 'title',
    43                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     43                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4444            ],
    4545            'title'       => [
    46                 'title'       => __( 'Title', 'woo-quickpay' ),
     46                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4747                'type'        => 'text',
    48                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    49                 'default'     => __( 'Sofort', 'woo-quickpay' )
     48                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     49                'default'     => esc_html__( 'Sofort', 'woocommerce-quickpay' )
    5050            ],
    5151            'description' => [
    52                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     52                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5353                'type'        => 'textarea',
    54                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    55                 'default'     => __( 'Pay with your mobile phone', 'woo-quickpay' )
     54                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     55                'default'     => esc_html__( 'Pay with your mobile phone', 'woocommerce-quickpay' )
    5656            ],
    5757        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/swish.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Swish payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Swish payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Swish', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Swish', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Swish', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Swish', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/trustly.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Trustly payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Trustly payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Trustly', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Trustly', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Trustly', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Trustly', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/viabill.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable ViaBill payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable ViaBill payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'ViaBill', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'ViaBill', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with ViaBill', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with ViaBill', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/tags/7.5.0/classes/instances/vipps.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Vipps payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Vipps payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Vipps', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Vipps', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Vipps', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Vipps', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-action.php

    r2924617 r3395304  
    3434     */
    3535    public function validate(): void {
    36         if ( ! $this->is_action_allowed() ) {
    37             wp_send_json_error( __( 'You are not allowed to perform this action', 'woo-quickpay' ) );
     36        $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
     37        if ( ! $this->is_action_allowed() || ! wp_verify_nonce( $nonce, 'manage-woocommerce-quickpay' ) ) {
     38            wp_send_json_error( esc_html__( 'You are not allowed to perform this action', 'woocommerce-quickpay' ) );
    3839        }
    3940
  • woocommerce-quickpay/tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-manage-payment.php

    r2924617 r3395304  
    99    public function execute(): void {
    1010        if ( isset( $_REQUEST['quickpay_action'], $_REQUEST['post'] ) ) {
    11             $param_action = $_REQUEST['quickpay_action'];
    12             $param_post   = $_REQUEST['post'];
     11            $param_action = sanitize_text_field( wp_unslash( $_REQUEST['quickpay_action'] ) );
     12            $param_post   = absint( wp_unslash( $_REQUEST['post'] ) );
    1313
    1414            if ( ! woocommerce_quickpay_can_user_manage_payments( $param_action ) ) {
     
    3434                    if ( method_exists( $payment, $param_action ) ) {
    3535                        // Fetch amount if sent.
    36                         $amount = isset( $_REQUEST['quickpay_amount'] ) ? WC_QuickPay_Helper::price_custom_to_multiplied( $_REQUEST['quickpay_amount'], $payment->get_currency() ) : $payment->get_remaining_balance();
     36                        $amount = isset( $_REQUEST['quickpay_amount'] ) ? WC_QuickPay_Helper::price_custom_to_multiplied( sanitize_text_field( $_REQUEST['quickpay_amount'] ), $payment->get_currency() ) : $payment->get_remaining_balance();
    3737
    3838                        // Call the action method and parse the transaction id and order object
     
    4343                } // The action was not allowed. Throw an exception
    4444                else {
    45                     throw new QuickPay_API_Exception( sprintf( "Action: \"%s\", is not allowed for order #%d, with type state \"%s\"", $param_action, WC_QuickPay_Order_Utils::get_clean_order_number( $order ), $payment->get_current_type() ) );
     45                    throw new QuickPay_API_Exception( sprintf( 'Action: \"%1$s\", is not allowed for order #%2$d, with type state \"%3$s\"', $param_action, WC_QuickPay_Order_Utils::get_clean_order_number( $order ), $payment->get_current_type() ) );
    4646                }
    4747            } catch ( QuickPay_Exception $e ) {
  • woocommerce-quickpay/tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-ping.php

    r2924617 r3395304  
    1010        if ( ! empty( $_POST['api_key'] ) ) {
    1111            try {
    12                 $api = new WC_QuickPay_API( sanitize_text_field( $_POST['api_key'] ) );
     12                $api = new WC_QuickPay_API( sanitize_text_field( wp_unslash($_POST['api_key']) ) );
    1313                $api->get( '/payments?page_size=1' );
    1414                wp_send_json_success();
  • woocommerce-quickpay/tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-private-key.php

    r2924617 r3395304  
    1010        try {
    1111            if ( empty( $_POST['api_key'] ) ) {
    12                 throw new \Exception( __( 'Please type in the API key before requesting a private key', 'woo-quickpay' ) );
     12                throw new \Exception( esc_html__( 'Please type in the API key before requesting a private key', 'woocommerce-quickpay' ) );
    1313            }
    1414
    15             if ( ! current_user_can( 'manage_woocommerce' ) ) {
    16                 throw new \Exception( __( 'You are not authorized to perform this action.', 'woo-quickpay' ) );
     15            $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] )) : '';
     16
     17            if ( ! current_user_can( 'manage_woocommerce' ) || ! wp_verify_nonce( $nonce, 'manage-woocommerce-quickpay' ) ) {
     18                throw new \Exception( esc_html__( 'You are not authorized to perform this action.', 'woocommerce-quickpay' ) );
    1719            }
    1820
    19             $api_key = $_POST['api_key'];
     21            $api_key = sanitize_text_field( wp_unslash( $_POST['api_key'] ) );
    2022
    2123            $api = new WC_QuickPay_API( $api_key );
  • woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-admin-orders-lists-table.php

    r3079637 r3395304  
    4040    public function filter_shop_order_posts_columns( $show_columns ): array {
    4141        $column_name   = 'quickpay_transaction_info';
    42         $column_header = __( 'Payment', 'woo-quickpay' );
     42        $column_header = esc_html__( 'Payment', 'woocommerce-quickpay' );
    4343
    4444        return WC_QuickPay_Helper::array_insert_after( 'shipping_address', $show_columns, $column_name, $column_header );
     
    8080                        'transaction_brand'          => $brand,
    8181                        'transaction_brand_logo_url' => WC_QuickPay_Helper::get_payment_type_logo( $brand ?: $transaction->get_acquirer() ),
    82                         'transaction_status'         => WC_QuickPay_Order_Utils::is_failed_renewal( $order ) ? __( 'Failed renewal', 'woo-quickpay' ) : $transaction->get_current_type(),
     82                        'transaction_status'         => WC_QuickPay_Order_Utils::is_failed_renewal( $order ) ? esc_html__( 'Failed renewal', 'woocommerce-quickpay' ) : $transaction->get_current_type(),
    8383                        'transaction_is_test'        => $transaction->is_test(),
    8484                        'is_cached'                  => $transaction->is_loaded_from_cached(),
     
    9898    public function order_bulk_actions( array $actions ): array {
    9999        if ( apply_filters( 'woocommerce_quickpay_allow_orders_bulk_actions', current_user_can( 'manage_woocommerce' ) ) ) {
    100             $actions['quickpay_capture_recurring']   = __( 'QuickPay: Capture payment and activate subscription', 'woo-quickpay' );
    101             $actions['quickpay_create_payment_link'] = __( 'QuickPay: Create payment link', 'woo-quickpay' );
     100            $actions['quickpay_capture_recurring']   = esc_html__( 'QuickPay: Capture payment and activate subscription', 'woocommerce-quickpay' );
     101            $actions['quickpay_create_payment_link'] = esc_html__( 'QuickPay: Create payment link', 'woocommerce-quickpay' );
    102102        }
    103103
     
    112112    public function subscription_bulk_actions( array $actions ): array {
    113113        if ( apply_filters( 'woocommerce_quickpay_allow_subscriptions_bulk_actions', current_user_can( 'manage_woocommerce' ) ) ) {
    114             $actions['quickpay_create_payment_link'] = __( 'QuickPay: Create payment link', 'woo-quickpay' );
     114            $actions['quickpay_create_payment_link'] = esc_html__( 'QuickPay: Create payment link', 'woocommerce-quickpay' );
    115115        }
    116116
     
    133133
    134134            // Redirect client
    135             wp_redirect( $_SERVER['HTTP_REFERER'] );
     135            wp_safe_redirect( wp_unslash($_SERVER['HTTP_REFERER'] ?? $redirect_to) );
    136136            exit;
    137137        }
     
    149149
    150150            if ( $changed ) {
    151                 woocommerce_quickpay_add_admin_notice( sprintf( __( 'Payment links created for %d orders.', 'woo-quickpay' ), $changed ) );
    152             }
    153 
    154             wp_redirect( $_SERVER['HTTP_REFERER'] );
     151                /* translators: 1: count of orders handled  */
     152                woocommerce_quickpay_add_admin_notice( sprintf( esc_html__( 'Payment links created for %d orders.', 'woocommerce-quickpay' ), $changed ) );
     153            }
     154
     155            wp_safe_redirect( wp_unslash($_SERVER['HTTP_REFERER'] ?? $redirect_to) );
    155156            exit;
    156157        }
     
    180181
    181182            if ( $changed ) {
    182                 woocommerce_quickpay_add_admin_notice( sprintf( __( 'Payment links created for %d subscriptions.', 'woo-quickpay' ), $changed ) );
    183             }
    184 
    185             wp_redirect( $_SERVER['HTTP_REFERER'] );
     183                /* translators: 1: count of subscriptions handled */
     184                woocommerce_quickpay_add_admin_notice( sprintf( esc_html__( 'Payment links created for %d subscriptions.', 'woocommerce-quickpay' ), $changed ) );
     185            }
     186
     187            wp_safe_redirect( wp_unslash($_SERVER['HTTP_REFERER'] ?? $redirect_to) );
    186188            exit;
    187189        }
  • woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-admin-orders-meta.php

    r2924617 r3395304  
    2828        if ( WC_QuickPay_Requests_Utils::is_current_admin_screen( $screen_orders, $screen_subs ) ) {
    2929            if ( ( $order = woocommerce_quickpay_get_order( $post_or_order ) ) && WC_QuickPay_Order_Payments_Utils::is_order_using_quickpay( $order ) ) {
    30                 add_meta_box( 'quickpay-payment-actions', __( 'QuickPay Payment', 'woo-quickpay' ), [ $this, 'meta_box_payment', ], $screen_orders, 'side', 'high' );
    31                 add_meta_box( 'quickpay-payment-actions', __( 'QuickPay Subscription', 'woo-quickpay' ), [ $this, 'meta_box_subscription', ], $screen_subs, 'side', 'high' );
     30                add_meta_box( 'quickpay-payment-actions', esc_html__( 'QuickPay Payment', 'woocommerce-quickpay' ), [ $this, 'meta_box_payment', ], $screen_orders, 'side', 'high' );
     31                add_meta_box( 'quickpay-payment-actions', esc_html__( 'QuickPay Subscription', 'woocommerce-quickpay' ), [ $this, 'meta_box_subscription', ], $screen_subs, 'side', 'high' );
    3232            }
    3333        }
     
    125125                $state = $transaction->get_state();
    126126                try {
    127                     $status = $transaction->get_current_type() . ' (' . __( 'subscription', 'woo-quickpay' ) . ')';
     127                    $status = $transaction->get_current_type() . ' (' . esc_html__( 'subscription', 'woocommerce-quickpay' ) . ')';
    128128                } catch ( QuickPay_API_Exception $e ) {
    129129                    if ( 'initial' !== $state ) {
  • woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-admin-orders.php

    r2932188 r3395304  
    3535        // By default, we will skip payment link creation if the order is paid already.
    3636        if ( ! apply_filters( 'woocommerce_quickpay_order_action_create_payment_link_for_order', ! $order->is_paid(), $order ) ) {
    37             woocommerce_quickpay_add_admin_notice( sprintf( __( 'Payment link creation skipped for order #%s', 'woo-quickpay' ), $order->get_id() ), 'error' );
     37            /* translators: 1: the order id */
     38            woocommerce_quickpay_add_admin_notice( sprintf( esc_html__( 'Payment link creation skipped for order #%s', 'woocommerce-quickpay' ), $order->get_id() ), 'error' );
    3839
    3940            return;
     
    5152
    5253                if ( ! $order_parent_id = $resource_order->get_parent_id() ) {
    53                     throw new QuickPay_Exception( __( 'A parent order must be mapped to the subscription.', 'woo-quickpay' ) );
     54                    throw new QuickPay_Exception( esc_html__( 'A parent order must be mapped to the subscription.', 'woocommerce-quickpay' ) );
    5455                }
    5556                $resource_order = wc_get_order( $order_parent_id );
     
    103104            // Check URL
    104105            if ( ! WC_QuickPay_Helper::is_url( $link->url ) ) {
    105                 throw new Exception( sprintf( __( 'Invalid payment link received from API for order #%s', 'woo-quickpay' ), $order->get_id() ) );
     106                /* translators: 1: the order id */
     107                throw new Exception( sprintf( esc_html__( 'Invalid payment link received from API for order #%s', 'woocommerce-quickpay' ), $order->get_id() ) );
    106108            }
    107109
     
    118120            // Make sure to save the changes to the order/subscription object
    119121            $order->save();
    120             $order->add_order_note( sprintf( __( 'Payment link manually created from backend: %s', 'woo-quickpay' ), $link->url ), false, true );
     122            /* translators: 1: Payment link url */
     123            $order->add_order_note( sprintf( esc_html__( 'Payment link manually created from backend: %s', 'woocommerce-quickpay' ), $link->url ), false, true );
    121124
    122125            do_action( 'woocommerce_quickpay_order_action_payment_link_created', $link->url, $order );
     
    124127            return true;
    125128        } catch ( Exception $e ) {
    126             woocommerce_quickpay_add_admin_notice( sprintf( __( 'Payment link could not be created for order #%s. Error: %s', 'woo-quickpay' ), $order->get_id(), $e->getMessage() ), 'error' );
     129            /* translators: 1: order id, 2: error message */
     130            woocommerce_quickpay_add_admin_notice( sprintf( esc_html__( 'Payment link could not be created for order #%1$s. Error: %2$s', 'woocommerce-quickpay' ), $order->get_id(), $e->getMessage() ), 'error' );
    127131
    128132            return false;
     
    153157     */
    154158    public function admin_order_actions( $actions ) {
    155         $actions['quickpay_create_payment_link'] = __( 'Create payment link', 'woo-quickpay' );
     159        $actions['quickpay_create_payment_link'] = esc_html__( 'Create payment link', 'woocommerce-quickpay' );
    156160
    157161        return $actions;
  • woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-orders.php

    r2924617 r3395304  
    2727                    if ( $transaction->is_action_allowed( 'cancel' ) ) {
    2828                        $transaction->cancel( $transaction_id );
    29                         $order->add_order_note( __( 'QuickPay: Payment cancelled due to order cancellation', 'woo-quickpay' ) );
     29                        $order->add_order_note( esc_html__( 'QuickPay: Payment cancelled due to order cancellation', 'woocommerce-quickpay' ) );
    3030                    }
    3131                } catch ( Exception $e ) {
     
    5555
    5656        if ( ! $is_mp_subscription && $autocomplete_renewal_orders && WC_QuickPay_Subscription::is_renewal( $order ) ) {
    57             $order->update_status( 'completed', __( 'Automatically completing order status due to successful recurring payment', 'woo-quickpay' ) );
     57            $order->update_status( 'completed', esc_html__( 'Automatically completing order status due to successful recurring payment', 'woocommerce-quickpay' ) );
    5858        }
    5959    }
  • woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-subscriptions-change-payment-method.php

    r2924617 r3395304  
    2020    public function maybe_apply_description_notice( ?string $description, string $gateway_id ): ?string {
    2121        if ( $gateway_id === WC_QP()->id && is_checkout() && wc_string_to_bool( WC_QP()->s( 'subscription_update_card_on_manual_renewal_payment' ) ) && WC_QuickPay_Subscription::cart_contains_renewal() ) {
    22             $description .= __( '<p><strong>NB:</strong> This will pay your order and update the credit card on your subscription for future payments.</p>', 'woo-quickpay' );
     22            $description .= sprintf(
     23                '<p><strong>%s</strong> %s</p>',
     24                esc_html__( 'NB:', 'woocommerce-quickpay' ),
     25                esc_html__( 'This will pay your order and update the credit card on your subscription for future payments.', 'woocommerce-quickpay' )
     26            );
    2327        }
    2428
  • woocommerce-quickpay/tags/7.5.0/classes/updates/woocommerce-quickpay-update-4.6.php

    r2924617 r3395304  
    5151                }
    5252
    53                 $logger->add( sprintf( 'Migrated transaction (%d) from parent order ID: %s to subscription order ID: %s', $transaction_id, $subscription_id, $order_id ) );
     53                $logger->add( sprintf( 'Migrated transaction (%1$d) from parent order ID: %2$s to subscription order ID: %3$s', $transaction_id, $subscription_id, $order_id ) );
    5454            } catch ( WC_Data_Exception|QuickPay_API_Exception $e ) {
    55                 $logger->add( sprintf( 'Failed migration of transaction (%d) from parent order ID: %s to subscription order ID: %s. Error: %s', $transaction_id, $subscription_id, $order_id, $e->getMessage() ) );
     55                $logger->add( sprintf( 'Failed migration of transaction (%1$d) from parent order ID: %2$s to subscription order ID: %3$s. Error: %4$s', $transaction_id, $subscription_id, $order_id, $e->getMessage() ) );
    5656            }
    5757        }
  • woocommerce-quickpay/tags/7.5.0/classes/utils/woocommerce-quickpay-order-payments-utils.php

    r3250888 r3395304  
    6464            $fee = new WC_Order_Item_Fee();
    6565
    66             $fee->set_name( __( 'Payment Fee', 'woo-quickpay' ) );
     66            $fee->set_name( __( 'Payment Fee', 'woocommerce-quickpay' ) );
    6767            $fee->set_total( $fee_in_cents / 100 );
    6868            $fee->set_tax_status( 'none' );
  • woocommerce-quickpay/tags/7.5.0/classes/utils/woocommerce-quickpay-order-transaction-data-utils.php

    r3250888 r3395304  
    109109        // Single: Order Email
    110110        if ( in_array( 'customer_email', $custom_vars_settings, true ) ) {
    111             $custom_vars[ __( 'Customer Email', 'woo-quickpay' ) ] = $order->get_billing_email();
     111            $custom_vars[ esc_html__( 'Customer Email', 'woocommerce-quickpay' ) ] = $order->get_billing_email();
    112112        }
    113113
    114114        // Single: Order Phone
    115115        if ( in_array( 'customer_phone', $custom_vars_settings, true ) ) {
    116             $custom_vars[ __( 'Customer Phone', 'woo-quickpay' ) ] = $order->get_billing_phone();
     116            $custom_vars[ esc_html__( 'Customer Phone', 'woocommerce-quickpay' ) ] = $order->get_billing_phone();
    117117        }
    118118
    119119        // Single: Browser User Agent
    120120        if ( in_array( 'browser_useragent', $custom_vars_settings, true ) ) {
    121             $custom_vars[ __( 'User Agent', 'woo-quickpay' ) ] = $order->get_customer_user_agent();
     121            $custom_vars[ esc_html__( 'User Agent', 'woocommerce-quickpay' ) ] = $order->get_customer_user_agent();
    122122        }
    123123
    124124        // Single: Shipping Method
    125125        if ( in_array( 'shipping_method', $custom_vars_settings, true ) ) {
    126             $custom_vars[ __( 'Shipping Method', 'woo-quickpay' ) ] = $order->get_shipping_method();
     126            $custom_vars[ esc_html__( 'Shipping Method', 'woocommerce-quickpay' ) ] = $order->get_shipping_method();
    127127        }
    128128
  • woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-callbacks.php

    r3250888 r3395304  
    2424                $order->set_transaction_id( $transaction->id );
    2525            } catch ( WC_Data_Exception $e ) {
    26                 WC_QP()->log->add( __( 'An error occured while setting transaction id: %d on order %s. %s', $transaction->id, $order->get_id(), $e->getMessage() ) );
     26                WC_QP()->log->add( sprintf( 'An error occured while setting transaction id: %1$d on order %2$s. %3$s', $transaction->id, $order->get_id(), $e->getMessage() ) );
    2727            }
    2828            WC_Pre_Orders_Order::mark_order_as_pre_ordered( $order );
     
    3838
    3939        // Write a note to the order history
    40         WC_QuickPay_Order_Utils::add_note( $order, sprintf( __( 'Payment authorized. Transaction ID: %s', 'woo-quickpay' ), $transaction->id ) );
     40        /* translators: 1: Transaction ID */
     41        WC_QuickPay_Order_Utils::add_note( $order, sprintf( esc_html__( 'Payment authorized. Transaction ID: %s', 'woocommerce-quickpay' ), $transaction->id ) );
    4142
    4243        // Fallback to save transaction IDs since this has seemed to sometimes fail when using WC_Order::payment_complete
     
    5354     */
    5455    public static function payment_captured( WC_Order $order, $transaction ) {
    55         $capture_note = __( 'Payment captured.', 'woo-quickpay' );
     56        $capture_note = esc_html__( 'Payment captured.', 'woocommerce-quickpay' );
    5657
    5758        $complete = WC_QuickPay_Helper::option_is_enabled( WC_QP()->s( 'quickpay_complete_on_capture' ) ) && ! $order->has_status( 'completed' );
     
    8788        // Allow 3rd party code to overwrite the note
    8889        $transition_status_note = apply_filters( 'woocommerce_quickpay_payment_cancelled_order_transition_status_note',
    89             __( 'Payment cancelled.', 'woo-quickpay' ),
     90            __( 'Payment cancelled.', 'woocommerce-quickpay' ),
    9091            $order,
    9192            $transaction,
     
    112113     */
    113114    public static function subscription_authorized( $subscription, WC_Order $related_order, $transaction ): void {
    114         WC_QuickPay_Order_Utils::add_note( $subscription, sprintf( __( 'Subscription authorized. Transaction ID: %s', 'woo-quickpay' ), $transaction->id ) );
     115        /* translators: 1: Subscription transaction id */
     116        WC_QuickPay_Order_Utils::add_note( $subscription, sprintf( esc_html__( 'Subscription authorized. Transaction ID: %s', 'woocommerce-quickpay' ), $transaction->id ) );
    115117        // Activate the subscription
    116118
     
    197199
    198200        if ( isset( $_GET['order_post_id'] ) ) {
    199             return (int) trim( $_GET['order_post_id'] );
     201            return absint( trim( sanitize_text_field( wp_unslash( $_GET['order_post_id'] ) ) ) );
    200202        }
    201203
     
    221223
    222224        if ( isset( $_GET['subscription_post_id'] ) ) {
    223             return (int) trim( $_GET['subscription_post_id'] );
     225            return absint( trim( sanitize_text_field( wp_unslash( $_GET['subscription_post_id'] ) ) ) );
    224226        }
    225227
  • woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-exceptions.php

    r3095043 r3395304  
    6868     */
    6969    public function write_standard_warning(): void {
    70         printf(
    71             wp_kses(
    72                 __( "An error occurred. For more information check out the <strong>%s</strong> logs inside <strong>WooCommerce -> System Status -> Logs</strong>.", 'woo-quickpay' ), [ 'strong' => [] ]
    73             ),
     70        echo wp_kses_post(sprintf(
     71            /* translators: 1: The text domain */
     72            __( "An error occurred. For more information check out the <strong>%s</strong> logs inside <strong>WooCommerce -> System Status -> Logs</strong>.", 'woocommerce-quickpay' ),
    7473            $this->log->get_domain()
    75         );
     74        ));
    7675    }
    7776}
  • woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-helper.php

    r3045559 r3395304  
    124124            wp_enqueue_script( 'quickpay-backend', plugins_url( '/assets/javascript/backend.js', __DIR__ ), [ 'jquery' ], self::static_version() );
    125125            wp_localize_script( 'quickpay-backend', 'quickpayBackend', [
    126                 'ajax_url' => WC_QuickPay_Admin_Ajax::get_instance()->get_base_url()
     126                'ajax_url' => WC_QuickPay_Admin_Ajax::get_instance()->get_base_url(),
     127                'nonce'    => wp_create_nonce( 'manage-woocommerce-quickpay' ),
    127128            ] );
    128129        }
     
    136137     */
    137138    protected static function maybe_enqueue_admin_statics(): bool {
    138         global $post;
    139139        /**
    140140         * Enqueue on the settings page for the gateways
    141141         */
    142142        if ( isset( $_GET['page'], $_GET['tab'], $_GET['section'] ) ) {
    143             if ( $_GET['page'] === 'wc-settings' && $_GET['tab'] === 'checkout' && array_key_exists( $_GET['section'], array_merge( [ 'quickpay' => null ], WC_QuickPay::get_gateway_instances() ) ) ) {
     143            if ( $_GET['page'] === 'wc-settings' && $_GET['tab'] === 'checkout' && array_key_exists( sanitize_text_field( wp_unslash( $_GET['section'] ) ), array_merge( [ 'quickpay' => null ], WC_QuickPay::get_gateway_instances() ) ) ) {
    144144                return true;
    145145            }
     
    177177     */
    178178    public static function load_i18n() {
    179         load_plugin_textdomain( 'woo-quickpay', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' );
     179        load_plugin_textdomain( 'woocommerce-quickpay', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' );
    180180    }
    181181
     
    324324     */
    325325    public static function spamshield_bypass_security_check( $bypass ) {
    326         return isset( $_GET['wc-api'] ) && strtolower( $_GET['wc-api'] ) === 'wc_quickpay';
     326        return isset( $_GET['wc-api'] ) && strtolower( sanitize_text_field( wp_unslash( $_GET['wc-api'] ) ) ) === 'wc_quickpay';
    327327    }
    328328
     
    369369        }
    370370
    371         $u_agent = $_SERVER['HTTP_USER_AGENT'];
     371        $u_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) );
    372372        $name    = 'Unknown';
    373373
  • woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-install.php

    r2459034 r3395304  
    142142     */
    143143    public static function ajax_run_upgrader() {
    144         $nonce = isset( $_POST['nonce'] ) ? $_POST['nonce'] : null;
     144        $nonce = isset( $_POST['nonce'] ) ? sanitize_text_field(wp_unslash($_POST['nonce'])) : null;
    145145
    146         if ( ! wp_verify_nonce( $nonce, 'woocommerce-quickpay-run-upgrader-nonce' ) && ! current_user_can( 'administrator' ) ) {
    147             echo json_encode( [ 'status' => 'error', 'message' => __( 'You are not authorized to perform this action', 'woo-quickpay' ) ] );
     146        if ( empty( $nonce ) || ! wp_verify_nonce(  $nonce , 'woocommerce-quickpay-run-upgrader-nonce' ) || ! current_user_can( 'administrator' ) ) {
     147            echo wp_json_encode( [ 'status' => 'error', 'message' => __( 'You are not authorized to perform this action', 'woocommerce-quickpay' ) ] );
    148148            exit;
    149149        }
     
    151151        self::update();
    152152
    153         echo json_encode( [ 'status' => 'success' ] );
     153        echo wp_json_encode( [ 'status' => 'success' ] );
    154154
    155155        exit;
  • woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-log.php

    r3076215 r3395304  
    6161
    6262        if ( is_array( $param ) ) {
    63             $message .= print_r( $param, true );
     63            $message .= wp_json_encode( $param, JSON_PRETTY_PRINT );
    6464        }
    6565
     
    110110     */
    111111    public function get_admin_link() {
    112         if ( defined('WC_VERSION')) {
    113             if (version_compare(WC_VERSION, '8.6', '>=')) {
     112        if ( defined( 'WC_VERSION' ) ) {
     113            if ( version_compare( WC_VERSION, '8.6', '>=' ) ) {
    114114                $args = [
    115                     'page'     => 'wc-status',
    116                     'tab'      => 'logs',
     115                    'page'   => 'wc-status',
     116                    'tab'    => 'logs',
    117117                    'source' => $this->_domain
    118118                ];
  • woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-settings.php

    r3394934 r3395304  
    2424            [
    2525                'enabled' => [
    26                     'title'   => __( 'Enable', 'woo-quickpay' ),
     26                    'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    2727                    'type'    => 'checkbox',
    28                     'label'   => __( 'Enable Quickpay Payment', 'woo-quickpay' ),
     28                    'label'   => esc_html__( 'Enable Quickpay Payment', 'woocommerce-quickpay' ),
    2929                    'default' => 'yes'
    3030                ],
     
    3232                '_Account_setup'               => [
    3333                    'type'  => 'title',
    34                     'title' => __( 'API - Integration', 'woo-quickpay' ),
     34                    'title' => esc_html__( 'API - Integration', 'woocommerce-quickpay' ),
    3535                ],
    3636                'quickpay_apikey'              => [
    37                     'title'       => __( 'Api User key', 'woo-quickpay' ) . self::get_required_symbol(),
    38                     'type'        => 'text',
    39                     'description' => __( 'Your API User\'s key. Create a separate API user in the "Users" tab inside the Quickpay manager.', 'woo-quickpay' ),
     37                    'title'       => esc_html__( 'Api User key', 'woocommerce-quickpay' ) . self::get_required_symbol(),
     38                    'type'        => 'text',
     39                    'description' => esc_html__( 'Your API User\'s key. Create a separate API user in the "Users" tab inside the Quickpay manager.', 'woocommerce-quickpay' ),
    4040                    'desc_tip'    => true,
    4141                ],
    4242                'quickpay_privatekey'          => [
    43                     'title'       => __( 'Private key', 'woo-quickpay' ) . self::get_required_symbol(),
    44                     'type'        => 'text',
    45                     'description' => __( 'Your agreement private key. Found in the "Integration" tab inside the Quickpay manager.', 'woo-quickpay' ),
     43                    'title'       => esc_html__( 'Private key', 'woocommerce-quickpay' ) . self::get_required_symbol(),
     44                    'type'        => 'text',
     45                    'description' => esc_html__( 'Your agreement private key. Found in the "Integration" tab inside the Quickpay manager.', 'woocommerce-quickpay' ),
    4646                    'desc_tip'    => true,
    4747                ],
    4848                '_Autocapture'                 => [
    4949                    'type'  => 'title',
    50                     'title' => __( 'Autocapture settings', 'woo-quickpay' )
     50                    'title' => esc_html__( 'Autocapture settings', 'woocommerce-quickpay' )
    5151                ],
    5252                'quickpay_autocapture'         => [
    53                     'title'       => __( 'Physical products (default)', 'woo-quickpay' ),
    54                     'type'        => 'checkbox',
    55                     'label'       => __( 'Enable', 'woo-quickpay' ),
    56                     'description' => __( 'Automatically capture payments on physical products.', 'woo-quickpay' ),
     53                    'title'       => esc_html__( 'Physical products (default)', 'woocommerce-quickpay' ),
     54                    'type'        => 'checkbox',
     55                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     56                    'description' => esc_html__( 'Automatically capture payments on physical products.', 'woocommerce-quickpay' ),
    5757                    'default'     => 'no',
    5858                    'desc_tip'    => false,
    5959                ],
    6060                'quickpay_autocapture_virtual' => [
    61                     'title'       => __( 'Virtual products', 'woo-quickpay' ),
    62                     'type'        => 'checkbox',
    63                     'label'       => __( 'Enable', 'woo-quickpay' ),
    64                     'description' => __( 'Automatically capture payments on virtual products. If the order contains both physical and virtual products, this setting will be overwritten by the default setting above.', 'woo-quickpay' ),
     61                    'title'       => esc_html__( 'Virtual products', 'woocommerce-quickpay' ),
     62                    'type'        => 'checkbox',
     63                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     64                    'description' => esc_html__( 'Automatically capture payments on virtual products. If the order contains both physical and virtual products, this setting will be overwritten by the default setting above.', 'woocommerce-quickpay' ),
    6565                    'default'     => 'no',
    6666                    'desc_tip'    => false,
     
    6868                '_caching'                     => [
    6969                    'type'  => 'title',
    70                     'title' => __( 'Transaction Cache', 'woo-quickpay' )
     70                    'title' => esc_html__( 'Transaction Cache', 'woocommerce-quickpay' )
    7171                ],
    7272                'quickpay_caching_enabled'     => [
    73                     'title'       => __( 'Enable Caching', 'woo-quickpay' ),
    74                     'type'        => 'checkbox',
    75                     'description' => __( 'Caches transaction data to improve application and web-server performance. <strong>Recommended.</strong>', 'woo-quickpay' ),
     73                    'title'       => esc_html__( 'Enable Caching', 'woocommerce-quickpay' ),
     74                    'type'        => 'checkbox',
     75                    'description' => wp_kses( __( 'Caches transaction data to improve application and web-server performance. <strong>Recommended.</strong>', 'woocommerce-quickpay' ), [ 'strong' => [] ] ),
    7676                    'default'     => 'yes',
    7777                    'desc_tip'    => false,
    7878                ],
    7979                'quickpay_caching_expiration'  => [
    80                     'title'       => __( 'Cache Expiration', 'woo-quickpay' ),
    81                     'label'       => __( 'Cache Expiration', 'woo-quickpay' ),
     80                    'title'       => esc_html__( 'Cache Expiration', 'woocommerce-quickpay' ),
     81                    'label'       => esc_html__( 'Cache Expiration', 'woocommerce-quickpay' ),
    8282                    'type'        => 'number',
    83                     'description' => __( '<strong>Time in seconds</strong> for how long a transaction should be cached. <strong>Default: 604800 (7 days).</strong>', 'woo-quickpay' ),
     83                    'description' => wp_kses_post( '<strong>Time in seconds</strong> for how long a transaction should be cached. <strong>Default: 604800 (7 days).</strong>', 'woocommerce-quickpay' ),
    8484                    'default'     => 7 * DAY_IN_SECONDS,
    8585                    'desc_tip'    => false,
     
    8888                '_Extra_gateway_settings' => [
    8989                    'type'  => 'title',
    90                     'title' => __( 'Extra gateway settings', 'woo-quickpay' )
     90                    'title' => esc_html__( 'Extra gateway settings', 'woocommerce-quickpay' )
    9191                ],
    9292                'quickpay_cardtypelock'   => [
    93                     'title'       => __( 'Payment methods', 'woo-quickpay' ),
    94                     'type'        => 'text',
    95                     'description' => __( 'Default: creditcard. Type in the cards you wish to accept (comma separated). See the valid payment types here: <b>https://learn.quickpay.net/tech-talk/appendixes/payment-methods/#payment-methods</b>', 'woo-quickpay' ),
     93                    'title'       => esc_html__( 'Payment methods', 'woocommerce-quickpay' ),
     94                    'type'        => 'text',
     95                    'description' => wp_kses_post( 'Default: creditcard. Type in the cards you wish to accept (comma separated). See the valid payment types here: <b>https://learn.quickpay.net/tech-talk/appendixes/payment-methods/#payment-methods</b>', 'woocommerce-quickpay' ),
    9696                    'default'     => 'creditcard',
    9797                ],
    9898                'quickpay_branding_id'    => [
    99                     'title'       => __( 'Branding ID', 'woo-quickpay' ),
    100                     'type'        => 'text',
    101                     'description' => __( 'Leave empty if you have no custom branding options', 'woo-quickpay' ),
     99                    'title'       => esc_html__( 'Branding ID', 'woocommerce-quickpay' ),
     100                    'type'        => 'text',
     101                    'description' => esc_html__( 'Leave empty if you have no custom branding options', 'woocommerce-quickpay' ),
    102102                    'default'     => '',
    103103                    'desc_tip'    => true,
     
    105105
    106106                'quickpay_autofee'                                   => [
    107                     'title'       => __( 'Enable autofee', 'woo-quickpay' ),
    108                     'type'        => 'checkbox',
    109                     'label'       => __( 'Enable', 'woo-quickpay' ),
    110                     'description' => __( 'Fees are charged according to the applicable rules for card fees, contact your redeemer for more information.', 'woo-quickpay' ),
     107                    'title'       => esc_html__( 'Enable autofee', 'woocommerce-quickpay' ),
     108                    'type'        => 'checkbox',
     109                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     110                    'description' => esc_html__( 'Fees are charged according to the applicable rules for card fees, contact your redeemer for more information.', 'woocommerce-quickpay' ),
    111111                    'default'     => 'no',
    112112                    'desc_tip'    => true,
    113113                ],
    114114                'quickpay_captureoncomplete'                         => [
    115                     'title'       => __( 'Capture on complete', 'woo-quickpay' ),
    116                     'type'        => 'checkbox',
    117                     'label'       => __( 'Enable', 'woo-quickpay' ),
    118                     'description' => __( 'When enabled quickpay payments will automatically be captured when order state is set to "Complete".', 'woo-quickpay' ),
    119                     'default'     => 'no',
    120                     'desc_tip'    => true,
    121                 ],
    122                 'quickpay_complete_on_capture'          => [
    123                     'title'       => __( 'Complete order on capture callbacks', 'woo-quickpay' ),
    124                     'type'        => 'checkbox',
    125                     'label'       => __( 'Enable', 'woo-quickpay' ),
    126                     'description' => __( 'When enabled, an order will be automatically completed when capture callbacks are sent to WooCommerce. Callbacks are sent by Quickpay when the payment is captured from either the shop or the Quickpay manager. Keep disabled to manually complete orders. ', 'woo-quickpay' ),
     115                    'title'       => esc_html__( 'Capture on complete', 'woocommerce-quickpay' ),
     116                    'type'        => 'checkbox',
     117                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     118                    'description' => esc_html__( 'When enabled quickpay payments will automatically be captured when order state is set to "Complete".', 'woocommerce-quickpay' ),
     119                    'default'     => 'no',
     120                    'desc_tip'    => true,
     121                ],
     122                'quickpay_complete_on_capture'                       => [
     123                    'title'       => esc_html__( 'Complete order on capture callbacks', 'woocommerce-quickpay' ),
     124                    'type'        => 'checkbox',
     125                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     126                    'description' => esc_html__( 'When enabled, an order will be automatically completed when capture callbacks are sent to WooCommerce. Callbacks are sent by Quickpay when the payment is captured from either the shop or the Quickpay manager. Keep disabled to manually complete orders. ', 'woocommerce-quickpay' ),
    127127                    'default'     => 'no',
    128128                ],
    129129                'quickpay_payment_cancelled_order_transition_status' => [
    130                     'title'       => __( 'Order status update on payment cancellation', 'woo-quickpay' ),
     130                    'title'       => esc_html__( 'Order status update on payment cancellation', 'woocommerce-quickpay' ),
    131131                    'type'        => 'select',
    132132                    'options'     => self::get_payment_cancelled_order_transition_statuses(),
    133                     'label'       => __( 'Enable', 'woo-quickpay' ),
    134                     'description' => __( 'When activated, orders linked to payments will change to the chosen status if the merchant cancels the payment.', 'woo-quickpay' ),
     133                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     134                    'description' => esc_html__( 'When activated, orders linked to payments will change to the chosen status if the merchant cancels the payment.', 'woocommerce-quickpay' ),
    135135                    'default'     => 'no',
    136136                ],
    137137                'quickpay_cancel_transaction_on_cancel'              => [
    138                     'title'       => __( 'Cancel payments on order cancellation', 'woo-quickpay' ),
    139                     'type'        => 'checkbox',
    140                     'label'       => __( 'Enable', 'woo-quickpay' ),
    141                     'description' => __( 'Automatically cancel payments via the API when an order\'s status changes to cancelled.', 'woo-quickpay' ),
     138                    'title'       => esc_html__( 'Cancel payments on order cancellation', 'woocommerce-quickpay' ),
     139                    'type'        => 'checkbox',
     140                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     141                    'description' => esc_html__( 'Automatically cancel payments via the API when an order\'s status changes to cancelled.', 'woocommerce-quickpay' ),
    142142                    'default'     => 'no',
    143143                ],
    144144                'quickpay_text_on_statement'                         => [
    145                     'title'             => __( 'Text on statement', 'woo-quickpay' ),
     145                    'title'             => esc_html__( 'Text on statement', 'woocommerce-quickpay' ),
    146146                    'type'              => 'text',
    147                     'description'       => __( 'Text that will be placed on cardholder’s bank statement (MAX 22 ASCII characters. Must match the values defined in your agreement with Clearhaus. Custom values are not allowed).', 'woo-quickpay' ),
     147                    'description'       => esc_html__( 'Text that will be placed on cardholder’s bank statement (MAX 22 ASCII characters. Must match the values defined in your agreement with Clearhaus. Custom values are not allowed).', 'woocommerce-quickpay' ),
    148148                    'default'           => '',
    149149                    'desc_tip'          => false,
     
    156156                '_Shop_setup'                           => [
    157157                    'type'  => 'title',
    158                     'title' => __( 'Shop setup', 'woo-quickpay' ),
     158                    'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    159159                ],
    160160                'title'                                 => [
    161                     'title'       => __( 'Title', 'woo-quickpay' ),
    162                     'type'        => 'text',
    163                     'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    164                     'default'     => __( 'Quickpay', 'woo-quickpay' ),
     161                    'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
     162                    'type'        => 'text',
     163                    'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     164                    'default'     => esc_html__( 'Quickpay', 'woocommerce-quickpay' ),
    165165                    'desc_tip'    => true,
    166166                ],
    167167                'description'                           => [
    168                     'title'       => __( 'Customer Message', 'woo-quickpay' ),
     168                    'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    169169                    'type'        => 'textarea',
    170                     'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    171                     'default'     => __( 'Pay via Quickpay. Allows you to pay with your credit card via Quickpay.', 'woo-quickpay' ),
     170                    'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     171                    'default'     => esc_html__( 'Pay via Quickpay. Allows you to pay with your credit card via Quickpay.', 'woocommerce-quickpay' ),
    172172                    'desc_tip'    => true,
    173173                ],
    174174                'checkout_button_text'                  => [
    175                     'title'       => __( 'Order button text', 'woo-quickpay' ),
    176                     'type'        => 'text',
    177                     'description' => __( 'Text shown on the submit button when choosing payment method.', 'woo-quickpay' ),
    178                     'default'     => __( 'Go to payment', 'woo-quickpay' ),
     175                    'title'       => esc_html__( 'Order button text', 'woocommerce-quickpay' ),
     176                    'type'        => 'text',
     177                    'description' => esc_html__( 'Text shown on the submit button when choosing payment method.', 'woocommerce-quickpay' ),
     178                    'default'     => esc_html__( 'Go to payment', 'woocommerce-quickpay' ),
    179179                    'desc_tip'    => true,
    180180                ],
    181181                'instructions'                          => [
    182                     'title'       => __( 'Email instructions', 'woo-quickpay' ),
     182                    'title'       => esc_html__( 'Email instructions', 'woocommerce-quickpay' ),
    183183                    'type'        => 'textarea',
    184                     'description' => __( 'Instructions that will be added to emails.', 'woo-quickpay' ),
     184                    'description' => esc_html__( 'Instructions that will be added to emails.', 'woocommerce-quickpay' ),
    185185                    'default'     => '',
    186186                    'desc_tip'    => true,
    187187                ],
    188188                'quickpay_icons'                        => [
    189                     'title'             => __( 'Credit card icons', 'woo-quickpay' ),
     189                    'title'             => esc_html__( 'Credit card icons', 'woocommerce-quickpay' ),
    190190                    'type'              => 'multiselect',
    191                     'description'       => __( 'Choose the card icons you wish to show next to the Quickpay payment option in your shop.', 'woo-quickpay' ),
     191                    'description'       => esc_html__( 'Choose the card icons you wish to show next to the Quickpay payment option in your shop.', 'woocommerce-quickpay' ),
    192192                    'desc_tip'          => true,
    193193                    'class'             => 'wc-enhanced-select',
    194194                    'css'               => 'width: 450px;',
    195195                    'custom_attributes' => [
    196                         'data-placeholder' => __( 'Select icons', 'woo-quickpay' )
     196                        'data-placeholder' => esc_html__( 'Select icons', 'woocommerce-quickpay' )
    197197                    ],
    198198                    'default'           => '',
     
    200200                ],
    201201                'quickpay_icons_maxheight'              => [
    202                     'title'       => __( 'Credit card icons maximum height', 'woo-quickpay' ),
     202                    'title'       => esc_html__( 'Credit card icons maximum height', 'woocommerce-quickpay' ),
    203203                    'type'        => 'number',
    204                     'description' => __( 'Set the maximum pixel height of the credit card icons shown on the frontend.', 'woo-quickpay' ),
     204                    'description' => esc_html__( 'Set the maximum pixel height of the credit card icons shown on the frontend.', 'woocommerce-quickpay' ),
    205205                    'default'     => 20,
    206206                    'desc_tip'    => true,
     
    208208                'Google Analytics'                      => [
    209209                    'type'  => 'title',
    210                     'title' => __( 'Google Analytics', 'woo-quickpay' ),
     210                    'title' => esc_html__( 'Google Analytics', 'woocommerce-quickpay' ),
    211211                ],
    212212                'quickpay_google_analytics_tracking_id' => [
    213                     'title'       => __( 'Tracking ID', 'woo-quickpay' ),
    214                     'type'        => 'text',
    215                     'description' => __( 'Your Google Analytics tracking ID. I.E: UA-XXXXXXXXX-X', 'woo-quickpay' ),
     213                    'title'       => esc_html__( 'Tracking ID', 'woocommerce-quickpay' ),
     214                    'type'        => 'text',
     215                    'description' => esc_html__( 'Your Google Analytics tracking ID. I.E: UA-XXXXXXXXX-X', 'woocommerce-quickpay' ),
    216216                    'default'     => '',
    217217                    'desc_tip'    => true,
     
    219219                'ShopAdminSetup'                        => [
    220220                    'type'  => 'title',
    221                     'title' => __( 'Shop Admin Setup', 'woo-quickpay' ),
     221                    'title' => esc_html__( 'Shop Admin Setup', 'woocommerce-quickpay' ),
    222222                ],
    223223
    224224                'quickpay_orders_transaction_info' => [
    225                     'title'       => __( 'Fetch Transaction Info', 'woo-quickpay' ),
    226                     'type'        => 'checkbox',
    227                     'label'       => __( 'Enable', 'woo-quickpay' ),
    228                     'description' => __( 'Show transaction information in the order overview.', 'woo-quickpay' ),
     225                    'title'       => esc_html__( 'Fetch Transaction Info', 'woocommerce-quickpay' ),
     226                    'type'        => 'checkbox',
     227                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     228                    'description' => esc_html__( 'Show transaction information in the order overview.', 'woocommerce-quickpay' ),
    229229                    'default'     => 'yes',
    230230                    'desc_tip'    => false,
     
    233233                'CustomVariables'           => [
    234234                    'type'  => 'title',
    235                     'title' => __( 'Custom Variables', 'woo-quickpay' ),
     235                    'title' => esc_html__( 'Custom Variables', 'woocommerce-quickpay' ),
    236236                ],
    237237                'quickpay_custom_variables' => [
    238                     'title'             => __( 'Select Information', 'woo-quickpay' ),
     238                    'title'             => esc_html__( 'Select Information', 'woocommerce-quickpay' ),
    239239                    'type'              => 'multiselect',
    240240                    'class'             => 'wc-enhanced-select',
    241241                    'css'               => 'width: 450px;',
    242242                    'default'           => '',
    243                     'description'       => __( 'Selected options will store the specific data on your transaction inside your Quickpay Manager.', 'woo-quickpay' ),
     243                    'description'       => esc_html__( 'Selected options will store the specific data on your transaction inside your Quickpay Manager.', 'woocommerce-quickpay' ),
    244244                    'options'           => self::custom_variable_options(),
    245245                    'desc_tip'          => true,
    246246                    'custom_attributes' => [
    247                         'data-placeholder' => __( 'Select order data', 'woo-quickpay' )
     247                        'data-placeholder' => esc_html__( 'Select order data', 'woocommerce-quickpay' )
    248248                    ]
    249249                ],
     
    257257
    258258            $fields['subscription_autocomplete_renewal_orders'] = [
    259                 'title'       => __( 'Complete renewal orders', 'woo-quickpay' ),
     259                'title'       => esc_html__( 'Complete renewal orders', 'woocommerce-quickpay' ),
    260260                'type'        => 'checkbox',
    261                 'label'       => __( 'Enable', 'woo-quickpay' ),
    262                 'description' => __( 'Automatically mark a renewal order as complete on successful recurring payments.', 'woo-quickpay' ),
     261                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     262                'description' => esc_html__( 'Automatically mark a renewal order as complete on successful recurring payments.', 'woocommerce-quickpay' ),
    263263                'default'     => 'no',
    264264                'desc_tip'    => true,
     
    267267            // Creates a subscription transaction on renewal orders and automatically captures payment for it afterwards on callback
    268268            $fields['subscription_update_card_on_manual_renewal_payment'] = [
    269                 'title'       => __( 'Update card on manual renewal payment', 'woo-quickpay' ),
     269                'title'       => esc_html__( 'Update card on manual renewal payment', 'woocommerce-quickpay' ),
    270270                'type'        => 'checkbox',
    271                 'label'       => __( 'Enable', 'woo-quickpay' ),
    272                 'description' => __( 'When paying failed renewals, the payment link will authorize a new subscription transaction which will be saved on the customer\'s subscription. On callback, a payment transaction related to the actual renewal order will be created.', 'woo-quickpay' ),
     271                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     272                'description' => esc_html__( 'When paying failed renewals, the payment link will authorize a new subscription transaction which will be saved on the customer\'s subscription. On callback, a payment transaction related to the actual renewal order will be created.', 'woocommerce-quickpay' ),
    273273                'default'     => 'no',
    274274                'desc_tip'    => true,
     
    298298        ], $statuses );
    299299
    300         $filtered_statuses = array_filter( $statuses, static fn( $status ) => in_array( $status, $allowed_status, true, ), ARRAY_FILTER_USE_KEY );
    301 
    302         return array_merge( [ null => __( '-- Select (optional) --', 'woo-quickpay' ) ], $filtered_statuses );
     300        $filtered_statuses = array_filter( $statuses, static fn( $status ) => in_array( $status, $allowed_status, true ), ARRAY_FILTER_USE_KEY );
     301
     302        return array_merge( [ null => esc_html__( '-- Select (optional) --', 'woocommerce-quickpay' ) ], $filtered_statuses );
    303303    }
    304304
     
    351351    private static function custom_variable_options() {
    352352        $options = [
    353             'billing_all_data'  => __( 'Billing: Complete Customer Details', 'woo-quickpay' ),
    354             'browser_useragent' => __( 'Browser: User Agent', 'woo-quickpay' ),
    355             'customer_email'    => __( 'Customer: Email Address', 'woo-quickpay' ),
    356             'customer_phone'    => __( 'Customer: Phone Number', 'woo-quickpay' ),
    357             'shipping_all_data' => __( 'Shipping: Complete Customer Details', 'woo-quickpay' ),
    358             'shipping_method'   => __( 'Shipping: Shipping Method', 'woo-quickpay' ),
     353            'billing_all_data'  => __( 'Billing: Complete Customer Details', 'woocommerce-quickpay' ),
     354            'browser_useragent' => __( 'Browser: User Agent', 'woocommerce-quickpay' ),
     355            'customer_email'    => __( 'Customer: Email Address', 'woocommerce-quickpay' ),
     356            'customer_phone'    => __( 'Customer: Phone Number', 'woocommerce-quickpay' ),
     357            'shipping_all_data' => __( 'Shipping: Complete Customer Details', 'woocommerce-quickpay' ),
     358            'shipping_method'   => __( 'Shipping: Shipping Method', 'woocommerce-quickpay' ),
    359359        ];
    360360
     
    370370     */
    371371    public static function clear_logs_section() {
    372         $html = sprintf( '<h3 class="wc-settings-sub-title">%s</h3>', __( 'Debug', 'woo-quickpay' ) );
    373         $html .= sprintf( '<a id="wcqp_wiki" class="wcqp-debug-button button button-primary" href="%s" target="_blank">%s</a>', self::get_wiki_link(), __( 'Got problems? Check out the Wiki.', 'woo-quickpay' ) );
    374         $html .= sprintf( '<a id="wcqp_logs" class="wcqp-debug-button button" href="%s">%s</a>', WC_QP()->log->get_admin_link(), __( 'View debug logs', 'woo-quickpay' ) );
     372        $html = sprintf( '<h3 class="wc-settings-sub-title">%s</h3>', esc_html__( 'Debug', 'woocommerce-quickpay' ) );
     373        $html .= sprintf( '<a id="wcqp_wiki" class="wcqp-debug-button button button-primary" href="%s" target="_blank">%s</a>', self::get_wiki_link(), esc_html__( 'Got problems? Check out the Wiki.', 'woocommerce-quickpay' ) );
     374        $html .= sprintf( '<a id="wcqp_logs" class="wcqp-debug-button button" href="%s">%s</a>', WC_QP()->log->get_admin_link(), esc_html__( 'View debug logs', 'woocommerce-quickpay' ) );
    375375
    376376        if ( woocommerce_quickpay_can_user_empty_logs() ) {
    377             $html .= sprintf( '<button role="button" id="wcqp_logs_clear" class="wcqp-debug-button button">%s</button>', __( 'Empty debug logs', 'woo-quickpay' ) );
     377            $html .= sprintf( '<button role="button" id="wcqp_logs_clear" class="wcqp-debug-button button">%s</button>', esc_html__( 'Empty debug logs', 'woocommerce-quickpay' ) );
    378378        }
    379379
    380380        if ( woocommerce_quickpay_can_user_flush_cache() ) {
    381             $html .= sprintf( '<button role="button" id="wcqp_flush_cache" class="wcqp-debug-button button">%s</button>', __( 'Empty transaction cache', 'woo-quickpay' ) );
     381            $html .= sprintf( '<button role="button" id="wcqp_flush_cache" class="wcqp-debug-button button">%s</button>', esc_html__( 'Empty transaction cache', 'woocommerce-quickpay' ) );
    382382        }
    383383
    384384        $html .= sprintf( '<br/>' );
    385         $html .= sprintf( '<h3 class="wc-settings-sub-title">%s</h3>', __( 'Enable', 'woo-quickpay' ) );
     385        $html .= sprintf( '<h3 class="wc-settings-sub-title">%s</h3>', esc_html__( 'Enable', 'woocommerce-quickpay' ) );
    386386
    387387        return $html;
     
    406406
    407407        $mandatory_fields = [
    408             'quickpay_privatekey' => __( 'Private key', 'woo-quickpay' ),
    409             'quickpay_apikey'     => __( 'Api User key', 'woo-quickpay' )
     408            'quickpay_privatekey' => __( 'Private key', 'woocommerce-quickpay' ),
     409            'quickpay_apikey'     => __( 'Api User key', 'woocommerce-quickpay' )
    410410        ];
    411411
     
    417417
    418418        if ( ! empty( $error_fields ) ) {
    419             $message = sprintf( '<h2>%s</h2>', __( "Quickpay for WooCommerce", 'woo-quickpay' ) );
    420             $message .= sprintf( '<p>%s</p>', sprintf( __( 'You have missing or incorrect settings. Go to the <a href="%s">settings page</a>.', 'woo-quickpay' ), self::get_settings_page_url() ) );
     419            $message = sprintf( '<h2>%s</h2>', esc_html__( "Quickpay for WooCommerce", 'woocommerce-quickpay' ) );
     420            /* translators: 1: Link to the settings page */
     421            $message .= sprintf( '<p>%s</p>', sprintf( __( 'You have missing or incorrect settings. Go to the <a href="%s">settings page</a>.', 'woocommerce-quickpay' ), esc_url( self::get_settings_page_url() ) ) );
    421422            $message .= '<ul>';
    422423            foreach ( $error_fields as $error_field ) {
    423                 $message .= "<li>" . sprintf( __( '<strong>%s</strong> is mandatory.', 'woo-quickpay' ), $error_field ) . "</li>";
     424                $message .= "<li>" . sprintf( wp_kses( '<strong>%s</strong> is mandatory.', 'woocommerce-quickpay', [ 'strong' ] ), esc_html( $error_field ) ) . "</li>";
    424425            }
    425426            $message .= '</ul>';
    426427
    427             printf( '<div class="%s">%s</div>', 'notice notice-error', $message );
     428            echo wp_kses_post( sprintf( '<div class="%s">%s</div>', 'notice notice-error', $message ) );
    428429        }
    429430
     
    447448
    448449        return empty( $_POST[ $post_key ] ) && empty( $setting_key );
    449 
    450450    }
    451451
  • woocommerce-quickpay/tags/7.5.0/helpers/notices.php

    r3095043 r3395304  
    110110            array_walk( $notices, 'esc_html' );
    111111            echo '<div class="wcqp-notice notice notice-error is-dismissible">';
    112             printf( '<h3>%s</h3>', __( 'Quickpay - Payment related problems registered' ) );
     112            printf( '<h3>%s</h3>', esc_html__( 'Quickpay - Payment related problems registered', 'woocommerce-quickpay') );
    113113            echo '<p>' . wp_kses_post( implode( "</p>\n<p>", $notices ) ) . '</p>';
    114114            echo '</div>';
  • woocommerce-quickpay/tags/7.5.0/helpers/requests.php

    r2924617 r3395304  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     3
    24/**
    35 * Ensure that payments.quickpay.net is a trusted redirect host
  • woocommerce-quickpay/tags/7.5.0/helpers/transactions.php

    r3250888 r3395304  
    6767
    6868    if ( ! $order->needs_payment() && ! WC_QuickPay_Requests_Utils::is_request_to_change_payment() ) {
    69         throw new Exception( __( 'Order does not need payment', 'woo-quickpay' ) );
     69        throw new Exception( esc_html__( 'Order does not need payment', 'woocommerce-quickpay' ) );
    7070    }
    7171
  • woocommerce-quickpay/tags/7.5.0/templates/admin/meta-box-order.php

    r2924617 r3395304  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) {
     3    exit;
     4} // Exit if accessed directly
     5
    26/**
    37 * @var WC_QuickPay_API_Transaction $transaction
     
    913 * @var string $transaction_brand
    1014 */
     15
    1116?>
    1217<?php if ( isset( $transaction ) ) : ?>
    13     <p class="woocommerce-quickpay-<?php echo esc_attr( $transaction_status ) ?>">
    14         <strong><?php _e( 'Current payment state', 'woo-quickpay' ) ?>: <?php echo $transaction_status ?></strong>
    15     </p>
     18    <p class="woocommerce-quickpay-<?php echo esc_attr( $transaction_status ) ?>">
     19        <strong><?php esc_html_e( 'Current payment state', 'woocommerce-quickpay' ) ?>: <?php echo esc_html( $transaction_status ) ?></strong>
     20    </p>
    1621
    17     <?php if ( $transaction->is_action_allowed( 'standard_actions' ) ) : ?>
    18         <h4><strong><?php _e( 'Actions', 'woo-quickpay' ) ?></strong></h4>
    19         <ul class="order_action">
    20             <?php if ( $transaction->is_action_allowed( 'capture' ) ) : ?>
    21                 <li class="qp-full-width">
    22                     <a class="button button-primary" data-action="capture" data-confirm="<?php echo esc_attr( __( 'You are about to capture this payment', 'woo-quickpay' ) ) ?>">
    23                         <?php printf( __( 'Capture Full Amount (%s)', 'woo-quickpay' ), wc_price( $transaction->get_remaining_balance_as_float(), [ 'currency' => $transaction->get_currency() ] ) ) ?>
    24                     </a>
    25                 </li>
    26             <?php endif ?>
     22    <?php if ( $transaction->is_action_allowed( 'standard_actions' ) ) : ?>
     23        <h4><strong><?php esc_html_e( 'Actions', 'woocommerce-quickpay' ) ?></strong></h4>
     24        <ul class="order_action">
     25            <?php if ( $transaction->is_action_allowed( 'capture' ) ) : ?>
     26                <li class="qp-full-width">
     27                    <a class="button button-primary" data-action="capture"
     28                       data-confirm="<?php echo esc_attr( __( 'You are about to capture this payment', 'woocommerce-quickpay' ) ) ?>">
     29                        <?php /* translators: %s: remaining balance */ ?>
     30                        <?php echo wp_kses_post( sprintf( __( 'Capture Full Amount (%s)', 'woocommerce-quickpay' ), wc_price( $transaction->get_remaining_balance_as_float(), [ 'currency' => $transaction->get_currency() ] ) ) ) ?>
     31                    </a>
     32                </li>
     33            <?php endif ?>
    2734
    28             <li class="qp-balance">
    29                 <span class="qp-balance__label"><?php _e( 'Remaining balance', 'woo-quickpay' ) ?>:</span>
    30                 <span class="qp-balance__amount">
     35            <li class="qp-balance">
     36                <span class="qp-balance__label"><?php esc_html_e( 'Remaining balance', 'woocommerce-quickpay' ) ?>:</span>
     37                <span class="qp-balance__amount">
    3138                <span class='qp-balance__currency'>
    32                 <?php echo $transaction->get_currency() ?>
     39                <?php echo esc_html( $transaction->get_currency() ) ?>
    3340                </span>
    34                 <?php echo $transaction->get_formatted_remaining_balance() ?></span>
    35             </li>
     41                <?php echo esc_html( $transaction->get_formatted_remaining_balance() ) ?></span>
     42            </li>
    3643
    37             <?php if ( $transaction->is_action_allowed( 'capture' ) ) : ?>
    38                 <li class="qp-balance last">
     44            <?php if ( $transaction->is_action_allowed( 'capture' ) ) : ?>
     45                <li class="qp-balance last">
    3946                <span class="qp-balance__label">
    40                     <?php _e( 'Capture amount', 'woo-quickpay' ) ?>:
     47                    <?php esc_html_e( 'Capture amount', 'woocommerce-quickpay' ) ?>:
    4148                </span>
    42                     <span class="qp-balance__amount">
    43                     <span class='qp-balance__currency'><?php echo $transaction->get_currency() ?></span>
     49                    <span class="qp-balance__amount">
     50                    <span class='qp-balance__currency'><?php echo esc_html( $transaction->get_currency() ) ?></span>
    4451                    <input id='qp-balance__amount-field' type='text' value='<?php echo esc_attr( $transaction->get_formatted_remaining_balance() ) ?> '/>
    4552                </span>
    46                 </li>
     53                </li>
    4754
    48                 <li class="qp-full-width">
    49                     <a class="button" data-action="captureAmount" data-confirm="<?php esc_attr__( 'You are about to capture this payment', 'woo-quickpay' ) ?>">
    50                         <?php _e( 'Capture Specified Amount', 'woo-quickpay' ) ?>
    51                     </a>
    52                 </li>
    53             <?php endif ?>
     55                <li class="qp-full-width">
     56                    <a class="button" data-action="captureAmount" data-confirm="<?php esc_attr__( 'You are about to capture this payment', 'woocommerce-quickpay' ) ?>">
     57                        <?php esc_html_e( 'Capture Specified Amount', 'woocommerce-quickpay' ) ?>
     58                    </a>
     59                </li>
     60            <?php endif ?>
    5461
    55             <?php if ( $transaction->is_action_allowed( 'cancel' ) ) : ?>
    56                 <li class="qp-full-width">
    57                     <a class="button" data-action="cancel" data-confirm="<?php esc_attr__( 'You are about to cancel this payment', 'woo-quickpay' ) ?>">
    58                         <?php _e( 'Cancel', 'woo-quickpay' ) ?>
    59                     </a>
    60                 </li>
    61             <?php endif ?>
    62         </ul>
    63     <?php endif ?>
    64     <p>
    65         <small>
    66             <strong><?php echo __( 'Transaction ID', 'woo-quickpay' ) ?>:</strong> <?php echo $transaction_id ?>
    67             <?php if ( $brand_image_url = WC_Quickpay_Helper::get_payment_type_logo( $transaction_brand ) ) : ?>
    68                 <span class="qp-meta-card">
     62            <?php if ( $transaction->is_action_allowed( 'cancel' ) ) : ?>
     63                <li class="qp-full-width">
     64                    <a class="button" data-action="cancel" data-confirm="<?php esc_attr__( 'You are about to cancel this payment', 'woocommerce-quickpay' ) ?>">
     65                        <?php esc_html_e( 'Cancel', 'woocommerce-quickpay' ) ?>
     66                    </a>
     67                </li>
     68            <?php endif ?>
     69        </ul>
     70    <?php endif ?>
     71    <p>
     72        <small>
     73            <strong><?php echo esc_html__( 'Transaction ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html( $transaction_id ) ?>
     74            <?php if ( $brand_image_url = WC_Quickpay_Helper::get_payment_type_logo( $transaction_brand ) ) : ?>
     75                <span class="qp-meta-card">
    6976                <img src="<?php echo esc_attr( $brand_image_url ) ?>" alt="<?php echo esc_attr( $transaction_brand ) ?>"/>
    7077            </span>
    71             <?php endif ?>
    72         </small>
    73     </p>
     78            <?php endif ?>
     79        </small>
     80    </p>
    7481<?php endif ?>
    7582
    7683<?php if ( ! empty( $transaction_order_id ) ) : ?>
    77     <p>
    78         <small>
    79             <strong><?php _e( 'Transaction Order ID', 'woo-quickpay' ) ?>:</strong> <?php echo $transaction_order_id ?>
    80         </small>
    81     </p>
     84    <p>
     85        <small>
     86            <strong><?php esc_html_e( 'Transaction Order ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html( $transaction_order_id ) ?>
     87        </small>
     88    </p>
    8289<?php endif ?>
    8390
    8491<?php if ( ! empty( $payment_id ) ) : ?>
    85     <p>
    86         <small>
    87             <strong><?php _e( 'Payment ID', 'woo-quickpay' ) ?>:</strong> <?php echo $payment_id ?>
    88         </small>
    89     </p>
     92    <p>
     93        <small>
     94            <strong><?php esc_html_e( 'Payment ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html( $payment_id ) ?>
     95        </small>
     96    </p>
    9097<?php endif ?>
    9198
    9299<?php if ( ! empty( $payment_link ) ) : ?>
    93     <p>
    94         <small>
    95             <strong><?php _e( 'Payment Link', 'woo-quickpay' ) ?>:</strong> <br/>
    96             <input type="text" style="width: 100%;" value="<?php echo esc_attr( $payment_link ) ?>" readonly/>
    97         </small>
    98     </p>
     100    <p>
     101        <small>
     102            <strong><?php esc_html_e( 'Payment Link', 'woocommerce-quickpay' ) ?>:</strong> <br/>
     103            <input type="text" style="width: 100%;" value="<?php echo esc_attr( $payment_link ) ?>" readonly/>
     104        </small>
     105    </p>
    99106<?php endif ?>
  • woocommerce-quickpay/tags/7.5.0/templates/admin/meta-box-subscription.php

    r2924617 r3395304  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     3
    24/**
    35 * @var string $transaction_status
     
    911    <p class="woocommerce-quickpay-<?php echo esc_attr( $transaction_status ) ?>">
    1012        <strong>
    11             <?php _e( 'Current payment state', 'woo-quickpay' ) ?>: <?php echo $transaction_status ?>
     13            <?php esc_html_e( 'Current payment state', 'woocommerce-quickpay' ) ?>: <?php echo esc_html($transaction_status) ?>
    1214        </strong>
    1315    </p>
     
    1719    <p>
    1820        <small>
    19             <strong><?php _e( 'Transaction ID', 'woo-quickpay' ) ?>:</strong> <?php echo $transaction_id ?>
     21            <strong><?php esc_html_e( 'Transaction ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html($transaction_id) ?>
    2022            <span class="qp-meta-card">
    2123                <img src="<?php echo esc_attr( WC_Quickpay_Helper::get_payment_type_logo( $transaction_brand ) ) ?>"
     
    2931    <p>
    3032        <small>
    31             <strong><?php _e( 'Transaction Order ID', 'woo-quickpay' ) ?>:</strong> <?php echo $transaction_order_id ?>
     33            <strong><?php esc_html_e( 'Transaction Order ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html($transaction_order_id) ?>
    3234        </small>
    3335    </p>
  • woocommerce-quickpay/tags/7.5.0/templates/woocommerce/emails/customer-quickpay-payment-link.php

    r2100188 r3395304  
    2525
    2626<?php /* translators: %s: Customer first name */ ?>
    27     <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
     27    <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce-quickpay' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
    2828
    29     <p><?php echo esc_html__( 'Thank you for your order.', 'woo-quickpay' ) . "\n\n"; ?></p>
     29    <p><?php echo esc_html__( 'Thank you for your order.', 'woocommerce-quickpay' ) . "\n\n"; ?></p>
    3030
    3131<?php /* translators: %s: Site title */ ?>
    32     <p><?php printf( esc_html__( 'Use the following link to pay and complete your order: %s', 'woo-quickpay' ), make_clickable( $payment_link ) ); ?></p>
     32    <p><?php printf( esc_html__( 'Use the following link to pay and complete your order: %s', 'woocommerce-quickpay' ), make_clickable( $payment_link ) ); ?></p>
    3333<?php
    3434
     
    5454?>
    5555    <p>
    56         <?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce' ); ?>
     56        <?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce-quickpay' ); ?>
    5757    </p>
    5858<?php
  • woocommerce-quickpay/tags/7.5.0/templates/woocommerce/emails/plain/customer-quickpay-payment-link.php

    r2100188 r3395304  
    2323
    2424/* translators: %s: Customer first name */
    25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
     25echo sprintf( esc_html__( 'Hi %s,', 'woocommerce-quickpay' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
    2626
    27 echo esc_html__( 'Thank you for your order.', 'woo-quickpay' ) . "\n\n";
     27echo esc_html__( 'Thank you for your order.', 'woocommerce-quickpay' ) . "\n\n";
    2828
    29 echo sprintf(esc_html__( 'Use the following link to pay and complete your order: %s', 'woo-quickpay' ). $payment_link) . "\n\n";
     29/* translators: 1: The payment link */
     30echo esc_html(sprintf(__( 'Use the following link to pay and complete your order: %s', 'woocommerce-quickpay' ). $payment_link)). "\n\n";
    3031
    3132echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
     
    5253do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
    5354
    54 echo esc_html__( 'Thanks for shopping with us.', 'woocommerce' ) . "\n\n";
     55echo esc_html__( 'Thanks for shopping with us.', 'woocommerce-quickpay' ) . "\n\n";
    5556
    5657echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
  • woocommerce-quickpay/tags/7.5.0/views/html-notice-update.php

    r3394934 r3395304  
    1010?>
    1111<div id="woocommerce-upgrade-notice" class="updated woocommerce-message wc-connect">
    12     <h3><strong><?php _e( 'Quickpay for WooCommerce - Data Update', 'woo-quickpay' ); ?></strong></h3>
    13     <p><?php _e( 'To ensure you get the best experience at all times, we need to update your store\'s database to the latest version.', 'woo-quickpay' ); ?></p>
    14     <p class="submit"><a href="#" class="woocommerce-quickpay-update-now button-primary"><?php _e( 'Run the updater', 'woo-quickpay' ); ?></a></p>
     12    <h3><strong><?php esc_html_e( 'Quickpay for WooCommerce - Data Update', 'woocommerce-quickpay' ); ?></strong></h3>
     13    <p><?php esc_html_e( 'To ensure you get the best experience at all times, we need to update your store\'s database to the latest version.', 'woocommerce-quickpay' ); ?></p>
     14    <p class="submit"><a href="#" class="woocommerce-quickpay-update-now button-primary"><?php esc_html_e( 'Run the updater', 'woocommerce-quickpay' ); ?></a></p>
    1515</div>
    1616<script type="text/javascript">
    1717    (function ($) {
    18         $( '.woocommerce-quickpay-update-now' ).click( 'click', function() {
    19             var confirm = window.confirm( '<?php echo esc_js( __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'woo-quickpay' ) ); ?>' ); // jshint ignore:line
     18        $('.woocommerce-quickpay-update-now').click('click', function () {
     19            var confirm = window.confirm('<?php echo esc_js( __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'woocommerce-quickpay' ) ); ?>'); // jshint ignore:line
    2020
    2121            if (confirm) {
     
    2424                message.find('p').fadeOut();
    2525
    26                 $.post('<?php echo admin_url('admin-ajax.php'); ?>', {
     26                $.post('<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>', {
    2727                    action: 'quickpay_run_data_upgrader',
    28                     nonce: '<?php echo WC_QuickPay_Install::create_run_upgrader_nonce(); ?>'
     28                    nonce: '<?php echo esc_attr( WC_QuickPay_Install::create_run_upgrader_nonce() ); ?>'
    2929                }, function () {
    30                     message.append($('<p></p>').text("<?php _e('The upgrader is now running. This might take a while. The notice will disappear once the upgrade is complete.', 'woo-quickpay'); ?>"));
     30                    message.append($('<p></p>').text("<?php esc_html_e( 'The upgrader is now running. This might take a while. The notice will disappear once the upgrade is complete.', 'woocommerce-quickpay' ); ?>"));
    3131                });
    3232            }
  • woocommerce-quickpay/tags/7.5.0/views/html-notice-upgrading.php

    r3394934 r3395304  
    1010?>
    1111<div id="woocommerce-upgrade-notice" class="updated woocommerce-message wc-connect">
    12     <h3><strong><?php _e( 'Quickpay for WooCommerce - Data Update', 'woo-quickpay' ); ?></strong></h3>
    13     <p><?php _e('The upgrader is now running. This might take a while. The notice will disappear once the upgrade is complete.', 'woo-quickpay'); ?></p>
    14 
     12    <h3><strong><?php esc_html_e( 'Quickpay for WooCommerce - Data Update', 'woocommerce-quickpay' ); ?></strong></h3>
     13    <p><?php esc_html_e('The upgrader is now running. This might take a while. The notice will disappear once the upgrade is complete.', 'woocommerce-quickpay'); ?></p>
    1514</div>
  • woocommerce-quickpay/tags/7.5.0/views/html-order-table-transaction-data.php

    r2100188 r3395304  
     1<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
     2
    13<div class="woocommerce-quickpay-order-transaction-data">
    24    <table border="0" cellpadding="0" cellspacing="0" class="meta">
    35        <tr>
    4             <td><?php _e('ID', 'woo-quickpay' ) ?>:</td>
    5             <td>#<?php echo $transaction_id ?></td>
     6            <td><?php esc_html_e('ID', 'woocommerce-quickpay' ) ?>:</td>
     7            <td>#<?php echo esc_html($transaction_id) ?></td>
    68        </tr>
    79        <tr>
    8             <td><?php _e('Order ID', 'woo-quickpay' ) ?>:</td>
    9             <td><?php echo $transaction_order_id ?></td>
     10            <td><?php esc_html_e('Order ID', 'woocommerce-quickpay' ) ?>:</td>
     11            <td><?php echo esc_html($transaction_order_id) ?></td>
    1012        </tr>
    1113        <tr>
    12             <td><?php _e('Method', 'woo-quickpay' ) ?>:</td>
     14            <td><?php esc_html_e('Method', 'woocommerce-quickpay' ) ?>:</td>
    1315            <td>
    14                 <span class="transaction-brand"><img src="<?php echo $transaction_brand_logo_url ?>" alt="<?php echo $transaction_brand ?>" title="<?php echo $transaction_brand ?>" /></span>
     16                <span class="transaction-brand"><img src="<?php echo esc_attr($transaction_brand_logo_url) ?>" alt="<?php echo esc_attr($transaction_brand) ?>" title="<?php echo esc_attr($transaction_brand) ?>" /></span>
    1517            </td>
    1618        </tr>
     
    1820    <div class="tags">
    1921        <?php if ( $transaction_is_test ) : ?>
    20             <?php $tip_transaction_test = esc_attr( __( 'This order has been paid with test card data!', 'woo-quickpay' ) ) ?>
    21             <span class="tag is-test tips" data-tip="<?php echo $tip_transaction_test ?>"><?php _e( 'Test', 'woo-quickpay' ) ?></span>
     22            <?php $tip_transaction_test = esc_attr( __( 'This order has been paid with test card data!', 'woocommerce-quickpay' ) ) ?>
     23            <span class="tag is-test tips" data-tip="<?php echo esc_attr($tip_transaction_test) ?>"><?php esc_html_e( 'Test', 'woocommerce-quickpay' ) ?></span>
    2224        <?php endif; ?>
    23         <span class="tag is-<?php echo $transaction_status ?>">
    24             <?php echo $transaction_status ?>
     25        <span class="tag is-<?php echo esc_attr($transaction_status) ?>">
     26            <?php echo esc_html($transaction_status) ?>
    2527        </span>
    2628        <?php if ( $is_cached ) : ?>
    27             <?php $tip_transaction_cached = esc_attr( __( 'NB: The transaction data is served from cached results. Click to view the order and update the cached data.', 'woo-quickpay' ) )?>
    28             <span class="tag tips" data-tip="<?php echo $tip_transaction_cached ?>"><?php _e( 'Cached', 'woo-quickpay' ) ?></span>
     29            <?php $tip_transaction_cached = esc_attr( __( 'NB: The transaction data is served from cached results. Click to view the order and update the cached data.', 'woocommerce-quickpay' ) )?>
     30            <span class="tag tips" data-tip="<?php echo esc_attr($tip_transaction_cached) ?>"><?php esc_html_e( 'Cached', 'woocommerce-quickpay' ) ?></span>
    2931        <?php endif; ?>
    3032
  • woocommerce-quickpay/tags/7.5.0/woocommerce-quickpay.php

    r3394934 r3395304  
    44 * Plugin URI: http://wordpress.org/plugins/woocommerce-quickpay/
    55 * Description: Integrates your Quickpay payment gateway into your WooCommerce installation.
    6  * Version: 7.4.0
     6 * Version: 7.5.0
    77 * Author: Perfect Solution
    8  * Text Domain: woo-quickpay
     8 * Text Domain: woocommerce-quickpay
    99 * Domain Path: /languages/
    1010 * Author URI: http://perfect-solution.dk
    1111 * Wiki: http://quickpay.perfect-solution.dk/
    1212 * WC requires at least: 7.1.0
    13  * WC tested up to: 8.9
     13 * WC tested up to: 10.5
     14 * License: GPLv2
     15 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1416 * Requires Plugins: woocommerce
    1517 */
     
    2022}
    2123
    22 define( 'WCQP_VERSION', '7.4.0' );
     24define( 'WCQP_VERSION', '7.5.0' );
    2325define( 'WCQP_URL', plugins_url( __FILE__ ) );
    2426define( 'WCQP_PATH', plugin_dir_path( __FILE__ ) );
     
    3133function wc_quickpay_woocommerce_inactive_notice() {
    3234    $class    = 'notice notice-error';
    33     $headline = __( 'Quickpay for WooCommerce requires WooCommerce to be active.', 'woo-quickpay' );
    34     $message  = __( 'Go to the plugins page to activate WooCommerce', 'woo-quickpay' );
    35     printf( '<div class="%1$s"><h2>%2$s</h2><p>%3$s</p></div>', $class, $headline, $message );
     35    $headline = __( 'Quickpay for WooCommerce requires WooCommerce to be active.', 'woocommerce-quickpay' );
     36    $message  = __( 'Go to the plugins page to activate WooCommerce', 'woocommerce-quickpay' );
     37    printf( '<div class="%1$s"><h2>%2$s</h2><p>%3$s</p></div>', esc_attr( $class ), esc_html( $headline ), esc_html( $message ) );
    3638}
    3739
     
    333335        public static function add_action_links( $links ) {
    334336            $links = array_merge( [
    335                 '<a href="' . WC_QuickPay_Settings::get_settings_page_url() . '">' . __( 'Settings', 'woo-quickpay' ) . '</a>',
     337                '<a href="' . WC_QuickPay_Settings::get_settings_page_url() . '">' . __( 'Settings', 'woocommerce-quickpay' ) . '</a>',
    336338            ], $links );
    337339
     
    404406        public function payment_fields(): void {
    405407            if ( $description = $this->get_description() ) {
    406                 echo wpautop( wptexturize( $description ) );
     408                echo wp_kses_post( wpautop( wptexturize( $description ) ) );
    407409            }
    408410        }
     
    527529                // Check if there is a transaction ID
    528530                if ( ! $transaction_id ) {
    529                     throw new QuickPay_Exception( sprintf( __( "No transaction ID for order: %s", 'woo-quickpay' ), $order_id ) );
     531                    /* translators: 1: the order id */
     532                    throw new QuickPay_Exception( sprintf( __( "No transaction ID for order: %s", 'woocommerce-quickpay' ), $order_id ) );
    530533                }
    531534
     
    537540                if ( ! $payment->is_action_allowed( 'refund' ) ) {
    538541                    if ( in_array( $payment->get_current_type(), [ 'authorize', 'recurring' ], true ) ) {
    539                         throw new QuickPay_Exception( __( 'A non-captured payment cannot be refunded.', 'woo-quickpay' ) );
     542                        throw new QuickPay_Exception( __( 'A non-captured payment cannot be refunded.', 'woocommerce-quickpay' ) );
    540543                    }
    541544
    542                     throw new QuickPay_Exception( __( 'Transaction state does not allow refunds.', 'woo-quickpay' ) );
     545                    throw new QuickPay_Exception( __( 'Transaction state does not allow refunds.', 'woocommerce-quickpay' ) );
    543546                }
    544547
     
    665668                    '_quickpay_transaction_id' => [
    666669                        'value' => WC_QuickPay_Order_Utils::get_transaction_id( $subscription ),
    667                         'label' => __( 'QuickPay Transaction ID', 'woo-quickpay' ),
     670                        'label' => __( 'QuickPay Transaction ID', 'woocommerce-quickpay' ),
    668671                    ],
    669672                ],
     
    693696
    694697                    // If transaction could be found, add a note on the order for history and debugging reasons.
    695                     $subscription->add_order_note( sprintf( __( 'QuickPay Transaction ID updated from #%d to #%d', 'woo-quickpay' ), $sub_transaction_id, $transaction_id ), 0, true );
     698                    /* translators: 1: old transaction ID, 2: new transaction ID */
     699                    $subscription->add_order_note( sprintf( esc_html__( 'QuickPay Transaction ID updated from #%1$d to #%2$d', 'woocommerce-quickpay' ), $sub_transaction_id, $transaction_id ), 0, true );
    696700                }
    697701            }
     
    750754            // Redirect the customer to account page if the current order is failed
    751755            if ( $order->get_status() === 'failed' ) {
    752                 $payment_failure_text = sprintf( __( '<p><strong>Payment failure</strong> A problem with your payment on order <strong>#%i</strong> occured. Please try again to complete your order.</p>', 'woo-quickpay' ), $order_id );
     756                $payment_failure_text = sprintf(
     757                    '<p><strong>%1$s</strong> %2$s %3$s</p>',
     758                    esc_html__( 'Payment failure', 'woocommerce-quickpay' ),
     759                        /* translators: 1: order number */
     760                        esc_html( sprintf( __( 'A problem with your payment on order %d occurred.', 'woocommerce-quickpay' ), absint( $order_id ) ) ),
     761                        esc_html__( 'Please try again to complete your order.', 'woocommerce-quickpay' )
     762                    );
    753763
    754764                wc_add_notice( $payment_failure_text, 'error' );
    755765
    756                 wp_redirect( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) );
    757             }
    758 
    759             $order->add_order_note( __( 'QuickPay Payment', 'woo-quickpay' ) . ': ' . __( 'Cancelled during process', 'woo-quickpay' ) );
    760 
    761             wc_add_notice( __( '<p><strong>%s</strong>: %s</p>', __( 'Payment cancelled', 'woo-quickpay' ), __( 'Due to cancellation of your payment, the order process was not completed. Please fulfill the payment to complete your order.', 'woo-quickpay' ) ), 'error' );
     766                wp_safe_redirect( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) );
     767            }
     768
     769            $order->add_order_note( esc_html__( 'QuickPay Payment', 'woocommerce-quickpay' ) . ': ' . esc_html__( 'Cancelled during process', 'woocommerce-quickpay' ) );
     770
     771            wc_add_notice( sprintf( '<p><strong>%s</strong>: %s</p>', esc_html__( 'Payment cancelled', 'woocommerce-quickpay' ), esc_html__( 'Due to cancellation of your payment, the order process was not completed. Please fulfill the payment to complete your order.', 'woocommerce-quickpay' ) ), 'error' );
    762772        }
    763773
     
    824834
    825835                                case 'refund' :
    826                                     $order->add_order_note( sprintf( 'Quickpay: ' . __( 'Refunded %s %s', 'woo-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) );
     836                                    /* translators: 1: price, 2: currency code */
     837                                    $order->add_order_note( sprintf( 'Quickpay: ' . __( 'Refunded %1$s %2$s', 'woocommerce-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) );
    827838                                    break;
    828839
     
    871882                    }
    872883                } else {
    873                     $this->log->add( sprintf( __( 'Invalid callback body for order #%s.', 'woo-quickpay' ), $order_number ) );
     884                    /* translators: 1: the order id */
     885                    $this->log->add( sprintf( __( 'Invalid callback body for order #%s.', 'woocommerce-quickpay' ), $order_number ) );
    874886                }
    875887            } catch ( JsonException $e ) {
     
    910922        public function generate_settings_html( $form_fields = array(), $echo = true ) {
    911923            $html = sprintf( "<p><small>Version: %s</small>", WCQP_VERSION );
    912             $html .= "<p>" . sprintf( __( 'Allows you to receive payments via %s', 'woo-quickpay' ), $this->get_method_title() ) . "</p>";
     924            /* translators: 1: payment method title */
     925            $html .= "<p>" . sprintf( __( 'Allows you to receive payments via %s', 'woocommerce-quickpay' ), $this->get_method_title() ) . "</p>";
    913926            $html .= WC_QuickPay_Settings::clear_logs_section();
    914927
     
    924937
    925938            if ( $echo ) {
    926                 echo $html; // WPCS: XSS ok.
     939                echo wp_kses_post( $html ); // WPCS: XSS ok.
    927940            } else {
    928941                return $html;
     
    947960
    948961            if ( $this->instructions ) {
    949                 echo wpautop( wptexturize( $this->instructions ) );
     962                echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) );
    950963            }
    951964        }
  • woocommerce-quickpay/trunk/README.txt

    r3394934 r3395304  
    22Contributors: PerfectSolution
    33Tags: gateway, payment, quickpay, woocommerce, subscriptions
    4 Requires at least: 4.0.0
    5 Tested up to: 6.5
    6 Stable tag: trunk
     4Requires at least: 6.7
     5Tested up to: 6.8
     6Stable tag: 7.5.0
    77License: GPLv2
    8 License URI: http://www.gnu.org/licenses/gpl-2.0.html
     8License URI: https://www.gnu.org/licenses/gpl-2.0.html
    99
    1010Integrates your Quickpay payment gateway into your WooCommerce installation.
     
    27273. If WooCommerce Subscriptions is used, the required minimum version is >= 5.0
    2828
     29== External services ==
     30
     31This plugin uses the Quickpay API which is necessary to process payments in your store.
     32
     33The information sent to Quickpay is based on the information stored in your WooCommerce store and can be adjusted
     34in the plugin settings, but transaction details may include order information and customer details.
     35
     36Link to Quickpay terms of service: https://quickpay.net/terms-of-service/
     37
    2938== Changelog ==
     39= 7.5.0 =
     40* Fik: Changed plugin display name to Quickpay for WooCommerce to comply with the WooCommerce trademark and WP guidelines.
     41* Fix: bumped tested with WC version to 10.5
     42* Fix: Improved sanitizing of various input fields
     43* Fix: Added nonce checks on ajax endpoints
     44* Fix: Added 'External services' section to readme
     45* Fix: Changed text-domain to 'woocommerce-quickpay'
     46
    3047= 7.4.0 =
    3148* Fix: Subscription switching was not always creating a subscription payment when upgrading from a free subscription to a paid variant where no previous payments have been made.
  • woocommerce-quickpay/trunk/assets/javascript/backend.js

    r2924617 r3395304  
    6767            url: quickpayBackend.ajax_url + 'admin/manage-payment',
    6868            dataType: 'json',
    69             data: $.extend({}, {post: this.postID}, dataObject),
     69            data: $.extend({}, {post: this.postID, '_wpnonce': quickpayBackend.nonce}, dataObject),
    7070            beforeSend: $.proxy(this.showLoader, this, true),
    7171            success: function () {
     
    104104
    105105    QuickPayCheckAPIStatus.prototype.pingAPI = function () {
    106         $.post(quickpayBackend.ajax_url + 'admin/settings/ping', {api_key: this.apiSettingsField.val()}, $.proxy(function (response) {
     106        $.post(quickpayBackend.ajax_url + 'admin/settings/ping', {api_key: this.apiSettingsField.val(), '_wpnonce': quickpayBackend.nonce}, $.proxy(function (response) {
    107107            if (response.success === true) {
    108108                this.indicator.addClass('ok').removeClass('error');
     
    142142            e.preventDefault();
    143143            emptyLogsButton.prop('disabled', true);
    144             $.getJSON(quickpayBackend.ajax_url + 'admin/settings/empty-logs', function (response) {
     144            $.getJSON(quickpayBackend.ajax_url + 'admin/settings/empty-logs', {'_wpnonce': quickpayBackend.nonce}, function (response) {
    145145                wcqpInsertAjaxResponseMessage(response);
    146146                emptyLogsButton.prop('disabled', false);
     
    152152            e.preventDefault();
    153153            flushCacheButton.prop('disabled', true);
    154             $.getJSON(quickpayBackend.ajax_url + 'admin/settings/clear-cache', function (response) {
     154            $.getJSON(quickpayBackend.ajax_url + 'admin/settings/clear-cache', {'_wpnonce': quickpayBackend.nonce}, function (response) {
    155155                wcqpInsertAjaxResponseMessage(response);
    156156                flushCacheButton.prop('disabled', false);
     
    183183            if (!self.refresh.hasClass('ok')) {
    184184                self.refresh.addClass('is-loading');
    185                 $.post(quickpayBackend.ajax_url + 'admin/settings/private-key', {api_key: self.apiKeyField.val()}, function (response) {
     185                $.post(quickpayBackend.ajax_url + 'admin/settings/private-key', {api_key: self.apiKeyField.val(), '_wpnonce': quickpayBackend.nonce}, function (response) {
    186186                    if (response.success === true) {
    187187                        self.field.val(response.data.private_key);
  • woocommerce-quickpay/trunk/classes/api/woocommerce-quickpay-api-payment.php

    r2924617 r3395304  
    5757        }
    5858
    59         $request = $this->post( sprintf( '%d/%s', $transaction_id, "capture" ), [ 'amount' => WC_QuickPay_Helper::price_multiply( $amount, $order->get_currency() ) ], true );
     59        $request = $this->post( sprintf( '%1$d/%2$s', (int) $transaction_id, "capture" ), [ 'amount' => WC_QuickPay_Helper::price_multiply( $amount, $order->get_currency() ) ], true );
    6060
    6161        $this->check_last_operation_of_type_with_location_fallback( 'capture', $order, $request );
     
    8787
    8888            if ( empty( $_action ) ) {
    89                 throw new QuickPay_Exception( sprintf( '%s inconclusive. Response from location header is empty.', ucfirst( $action ) ) );
     89                throw new QuickPay_Exception( wp_kses_post(sprintf( '%s inconclusive. Response from location header is empty.', ucfirst( $action ) )) );
    9090            }
    9191        }
    9292
    9393        if ( ! $follow_location && ! $_action ) {
    94             throw new QuickPay_Exception( sprintf( 'No %s operation or location found: %s', $action, json_encode( $this->resource_data ) ) );
     94            throw new QuickPay_Exception( wp_kses_post(sprintf( 'No %s operation or location found: %s', $action, json_encode( $this->resource_data ) )) );
    9595        }
    9696
    9797
    9898        if ( $_action->qp_status_code > 20200 ) {
    99             throw new QuickPay_Capture_Exception( sprintf( '%s payment on order #%s failed. Message: %s', ucfirst( $action ), $order->get_id(), $_action->qp_status_msg ) );
     99            throw new QuickPay_Capture_Exception( wp_kses_post(sprintf( '%s payment on order #%s failed. Message: %s', ucfirst( $action ), $order->get_id(), $_action->qp_status_msg ) ));
    100100        }
    101101    }
     
    115115     */
    116116    public function cancel( $transaction_id ): void {
    117         $this->post( sprintf( '%d/%s', $transaction_id, "cancel" ) );
     117        $this->post( sprintf( '%1$d/%2$s', (int) $transaction_id, "cancel" ) );
    118118    }
    119119
     
    147147        $product = reset( $basket_items );
    148148
    149         $request = $this->post( sprintf( '%d/%s', $transaction_id, "refund" ), [
     149        $request = $this->post( sprintf( '%1$d/%2$s', $transaction_id, "refund" ), [
    150150            'amount'   => WC_QuickPay_Helper::price_multiply( $amount, $order->get_currency() ),
    151151            'vat_rate' => $product['vat_rate'],
  • woocommerce-quickpay/trunk/classes/api/woocommerce-quickpay-api-subscription.php

    r2924617 r3395304  
    5252        $order_number = WC_QuickPay_Order_Payments_Utils::get_order_number_for_api( $order, true );
    5353
    54         $request_url = sprintf( '%d/%s', $subscription_id, "recurring" );
     54        $request_url = sprintf( '%1$d/%2$s', (int) $subscription_id, "recurring" );
    5555
    5656        $request_data = apply_filters( 'woocommerce_quickpay_create_recurring_payment_data', [
     
    8282     */
    8383    public function cancel( int $subscription_id ): void {
    84         $this->post( sprintf( '%d/%s', $subscription_id, "cancel" ) );
     84        $this->post( sprintf( '%1$d/%2$s', $subscription_id, "cancel" ) );
    8585    }
    8686
  • woocommerce-quickpay/trunk/classes/api/woocommerce-quickpay-api-transaction.php

    r2924617 r3395304  
    8282
    8383        if ( wc_string_to_bool( $last_operation->pending ) ) {
    84             $last_operation->type = __( 'Pending - check your QuickPay manager', 'woo-quickpay' );
     84            $last_operation->type = esc_html__( 'Pending - check your QuickPay manager', 'woocommerce-quickpay' );
    8585        }
    8686
     
    395395
    396396        if ( empty( $transaction_id ) ) {
    397             throw new QuickPay_Exception( __( 'Transaction ID cannot be empty', 'woo-quickpay' ) );
     397            throw new QuickPay_Exception( esc_html__( 'Transaction ID cannot be empty', 'woocommerce-quickpay' ) );
    398398        }
    399399
  • woocommerce-quickpay/trunk/classes/api/woocommerce-quickpay-api.php

    r2924617 r3395304  
    235235                throw new QuickPay_API_Exception( $this->resource_data->message, $response_code, null, $curl_request_url, $request_form_data, $response_data );
    236236            } else {
    237                 throw new QuickPay_API_Exception( (string) json_encode( $this->resource_data ), $response_code, null, $curl_request_url, $request_form_data, $response_data );
     237                throw new QuickPay_API_Exception( (string) wp_json_encode( $this->resource_data ), $response_code, null, $curl_request_url, $request_form_data, $response_data );
    238238            }
    239239
  • woocommerce-quickpay/trunk/classes/emails/woocommerce-quickpay-payment-link-email.php

    r2924617 r3395304  
    1111        $this->customer_email = true;
    1212        $this->id             = 'woocommerce_quickpay_payment_link';
    13         $this->title          = __( 'Payment link created', 'woo-quickpay' );
    14         $this->description    = __( 'This e-mail is sent upon manual payment link creation by a shop admin.', 'woo-quickpay' );
     13        $this->title          = esc_html__( 'Payment link created', 'woocommerce-quickpay' );
     14        $this->description    = esc_html__( 'This e-mail is sent upon manual payment link creation by a shop admin.', 'woocommerce-quickpay' );
    1515        $this->template_html  = 'emails/customer-quickpay-payment-link.php';
    1616        $this->template_plain = 'emails/plain/customer-quickpay-payment-link.php';
     
    9191        $this->form_fields = [
    9292            'enabled'    => [
    93                 'title'   => __( 'Enable/Disable', 'woocommerce' ),
     93                'title'   => esc_html__( 'Enable/Disable', 'woocommerce-quickpay' ),
    9494                'type'    => 'checkbox',
    95                 'label'   => __( 'Enable this email notification', 'woocommerce' ),
     95                'label'   => esc_html__( 'Enable this email notification', 'woocommerce-quickpay' ),
    9696                'default' => 'yes',
    9797            ],
    9898            'subject'    => [
    99                 'title'       => __( 'Subject', 'woocommerce' ),
     99                'title'       => esc_html__( 'Subject', 'woocommerce-quickpay' ),
    100100                'type'        => 'text',
    101101                'desc_tip'    => true,
    102102                /* translators: %s: list of placeholders */
    103                 'description' => sprintf( __( 'Available placeholders: %s', 'woocommerce' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
     103                'description' => sprintf( esc_html__( 'Available placeholders: %s', 'woocommerce-quickpay' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
    104104                'placeholder' => $this->get_default_subject(),
    105105                'default'     => '',
    106106            ],
    107107            'heading'    => [
    108                 'title'       => __( 'Email heading', 'woocommerce' ),
     108                'title'       => esc_html__( 'Email heading', 'woocommerce-quickpay' ),
    109109                'type'        => 'text',
    110110                'desc_tip'    => true,
    111111                /* translators: %s: list of placeholders */
    112                 'description' => sprintf( __( 'Available placeholders: %s', 'woocommerce' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
     112                'description' => sprintf( esc_html__( 'Available placeholders: %s', 'woocommerce-quickpay' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
    113113                'placeholder' => $this->get_default_heading(),
    114114                'default'     => '',
    115115            ],
    116116            'email_type' => [
    117                 'title'       => __( 'Email type', 'woocommerce' ),
     117                'title'       => esc_html__( 'Email type', 'woocommerce-quickpay' ),
    118118                'type'        => 'select',
    119                 'description' => __( 'Choose which format of email to send.', 'woocommerce' ),
     119                'description' => esc_html__( 'Choose which format of email to send.', 'woocommerce-quickpay' ),
    120120                'default'     => 'html',
    121121                'class'       => 'email_type wc-enhanced-select',
     
    133133     */
    134134    public function get_default_subject() {
    135         return __( 'Payment link for your order ({order_number})', 'woo-quickpay' );
     135        return esc_html__( 'Payment link for your order ({order_number})', 'woocommerce-quickpay' );
    136136    }
    137137
     
    143143     */
    144144    public function get_default_heading() {
    145         return __( 'This is your payment link', 'woo-quickpay' );
     145        return esc_html__( 'This is your payment link', 'woocommerce-quickpay' );
    146146    }
    147147}
  • woocommerce-quickpay/trunk/classes/instances/anyday.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => sprintf( __( 'Enable %s payment', 'woo-quickpay' ), 'Anyday' ),
     37                /* translators: 1: name of the payment gateway */
     38                'label'   => sprintf( esc_html__( 'Enable %s payment', 'woocommerce-quickpay' ), 'Anyday' ),
    3839                'default' => 'no'
    3940            ],
    4041            '_Shop_setup' => [
    4142                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     43                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4344            ],
    4445            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     46                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4647                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Anyday', 'woo-quickpay' )
     48                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     49                'default'     => esc_html__( 'Anyday', 'woocommerce-quickpay' )
    4950            ],
    5051            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     52                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5253                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => sprintf( __( 'Pay with %s', 'woo-quickpay' ), 'Anyday' )
     54                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     55                /* translators: 1: name of the payment gateway */
     56                'default'     => sprintf( esc_html__( 'Pay with %s', 'woocommerce-quickpay' ), 'Anyday' )
    5557            ],
    5658        ];
  • woocommerce-quickpay/trunk/classes/instances/apple-pay.php

    r3095043 r3395304  
    3434        $this->form_fields = [
    3535            'enabled'     => [
    36                 'title'   => __( 'Enable', 'woo-quickpay' ),
     36                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3737                'type'    => 'checkbox',
    38                 'label'   => sprintf( __( 'Enable %s payment', 'woo-quickpay' ), 'Apple Pay' ),
     38                /* translators: 1: name of the payment gateway  */
     39                'label'   => sprintf( esc_html__( 'Enable %s payment', 'woocommerce-quickpay' ), 'Apple Pay' ),
    3940                'default' => 'no',
    40                 'description' => sprintf(__( 'Works only in %s.', 'woo-quickpay' ), 'Safari' )
     41                /* translators: 1: name of the browser */
     42                'description' => sprintf(esc_html__( 'Works only in %s.', 'woocommerce-quickpay' ), 'Safari' )
    4143            ],
    4244            '_Shop_setup' => [
    4345                'type'  => 'title',
    44                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     46                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4547            ],
    4648            'title'       => [
    47                 'title'       => __( 'Title', 'woo-quickpay' ),
     49                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4850                'type'        => 'text',
    49                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    50                 'default'     => __( 'Apple Pay', 'woo-quickpay' )
     51                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     52                'default'     => esc_html__( 'Apple Pay', 'woocommerce-quickpay' )
    5153            ],
    5254            'description' => [
    53                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     55                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5456                'type'        => 'textarea',
    55                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    56                 'default'     => sprintf( __( 'Pay with %s', 'woo-quickpay' ), 'Apple Pay' )
     57                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     58                /* translators: 1: name of the payment gateway */
     59                'default'     => sprintf( esc_html__( 'Pay with %s', 'woocommerce-quickpay' ), 'Apple Pay' )
    5760            ],
    5861        ];
  • woocommerce-quickpay/trunk/classes/instances/fbg1886.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Forbrugsforeningen payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Forbrugsforeningen payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Forbrugsforeningen af 1886', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Forbrugsforeningen af 1886', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Forbrugsforeningen af 1886', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Forbrugsforeningen af 1886', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/trunk/classes/instances/google-pay.php

    r3095043 r3395304  
    4949        $this->form_fields = [
    5050            'enabled'     => [
    51                 'title'       => __( 'Enable', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    5252                'type'        => 'checkbox',
    53                 'label'       => sprintf( __( 'Enable %s payment', 'woo-quickpay' ), 'Google Pay' ),
    54                 'description' => sprintf( __( 'Works only in %s.', 'woo-quickpay' ), 'Chrome' ),
     53                /* translators: 1: name of the payment gateway */
     54                'label'       => sprintf( esc_html__( 'Enable %s payment', 'woocommerce-quickpay' ), 'Google Pay' ),
     55                /* translators: 1: browser name */
     56                'description' => sprintf( esc_html__( 'Works only in %s.', 'woocommerce-quickpay' ), 'Chrome' ),
    5557                'default'     => 'no'
    5658            ],
    5759            '_Shop_setup' => [
    5860                'type'  => 'title',
    59                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     61                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    6062            ],
    6163            'title'       => [
    62                 'title'       => __( 'Title', 'woo-quickpay' ),
     64                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    6365                'type'        => 'text',
    64                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    65                 'default'     => __( 'Google Pay', 'woo-quickpay' )
     66                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     67                'default'     => esc_html__( 'Google Pay', 'woocommerce-quickpay' )
    6668            ],
    6769            'description' => [
    68                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     70                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    6971                'type'        => 'textarea',
    70                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    71                 'default'     => sprintf( __( 'Pay with %s', 'woo-quickpay' ), 'Google Pay' )
     72                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     73                /* translators: 1: name of the payment gateway */
     74                'default'     => sprintf( esc_html__( 'Pay with %s', 'woocommerce-quickpay' ), 'Google Pay' )
    7275            ],
    7376        ];
  • woocommerce-quickpay/trunk/classes/instances/ideal.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable iDEAL payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable iDEAL payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'iDEAL', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'iDEAL', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with iDEAL', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with iDEAL', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/trunk/classes/instances/instance.php

    r3095043 r3395304  
    5555        ];
    5656
     57        $allowed_html = [
     58            'a' => [
     59                'href' => [],
     60            ],
     61        ];
     62
    5763        $html = sprintf( "<p><small>Version: %s</small>", WCQP_VERSION );
    58         $html .= "<p>" . sprintf( __( 'Allows you to receive payments via %s', 'woo-quickpay' ), $this->method_title ) . "</p>";
    59         $html .= "<p>" . sprintf( __( 'This module has it\'s main configuration inside the \'QuickPay\' tab.', 'woo-quickpay' ), 's' ) . "</p>";
    60         $html .= "<p>" . sprintf( __( 'Click <a href="%s">here</a> to access the main configuration.', 'woo-quickpay' ), add_query_arg( $main_settings_args, admin_url( 'admin.php' ) ) ) . "</p>";
     64        /* translators: 1: Payment method title */
     65        $html .= "<p>" . sprintf( esc_html__( 'Allows you to receive payments via %s', 'woocommerce-quickpay' ), $this->method_title ) . "</p>";
     66        $html .= "<p>" . sprintf( esc_html__( 'This module has it\'s main configuration inside the \'QuickPay\' tab.', 'woocommerce-quickpay' ), 's' ) . "</p>";
     67        /* translators: 1:  Link to the main settings page */
     68        $html .= "<p>" . wp_kses( sprintf( __( 'Click <a href="%s">here</a> to access the main configuration.', 'woocommerce-quickpay' ), esc_url( add_query_arg( $main_settings_args, admin_url( 'admin.php' ) ) ) ), $allowed_html ) . "</p>";
    6169
    6270        $html .= get_parent_class( get_parent_class( get_parent_class( $this ) ) )::generate_settings_html( $form_fields, $echo );
    6371
    6472        if ( $echo ) {
    65             echo $html; // WPCS: XSS ok.
     73            echo wp_kses_post($html); // WPCS: XSS ok.
    6674        } else {
    6775            return $html;
  • woocommerce-quickpay/trunk/classes/instances/klarna.php

    r3095043 r3395304  
    3434        $this->form_fields = [
    3535            'enabled' => [
    36                 'title' => __( 'Enable', 'woo-quickpay' ),
     36                'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3737                'type' => 'checkbox',
    38                 'label' => __( 'Enable Klarna payment', 'woo-quickpay' ),
     38                'label' => esc_html__( 'Enable Klarna payment', 'woocommerce-quickpay' ),
    3939                'default' => 'no'
    4040            ],
    4141            '_Shop_setup' => [
    4242                'type' => 'title',
    43                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     43                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4444            ],
    4545            'title' => [
    46                 'title' => __( 'Title', 'woo-quickpay' ),
     46                'title' => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4747                'type' => 'text',
    48                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    49                 'default' => __('Klarna', 'woo-quickpay')
     48                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     49                'default' => esc_html__('Klarna', 'woocommerce-quickpay')
    5050            ],
    5151            'description' => [
    52                 'title' => __( 'Customer Message', 'woo-quickpay' ),
     52                'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5353                'type' => 'textarea',
    54                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    55                 'default' => __('Pay with Klarna', 'woo-quickpay')
     54                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     55                'default' => esc_html__('Pay with Klarna', 'woocommerce-quickpay')
    5656            ],
    5757        ];
  • woocommerce-quickpay/trunk/classes/instances/mobilepay-subscriptions.php

    r3095043 r3395304  
    6565            // Check if the subscription has the allowed status
    6666            if ( $subscription->has_status( $allowed_transition_from ) ) {
    67                 $note = ! empty( $operation->aq_status_msg ) ? $operation->aq_status_msg : __( 'Subscription transaction has been cancelled by merchant or customer', 'woo-quickpay' );
     67                $note = ! empty( $operation->aq_status_msg ) ? $operation->aq_status_msg : esc_html__( 'Subscription transaction has been cancelled by merchant or customer', 'woocommerce-quickpay' );
    6868                // If the setting has been set to cancelled, we will run the cancel_order method on the subscription to
    6969                // take advantage of the built-in pending-cancel/cancelled functionality.
     
    149149        $this->form_fields = [
    150150            'enabled'                             => [
    151                 'title'   => __( 'Enable', 'woo-quickpay' ),
     151                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    152152                'type'    => 'checkbox',
    153                 'label'   => sprintf( __( 'Enable %s payment', 'woo-quickpay' ), $this->get_sanitized_method_title() ),
     153                /* translators: 1: name of the payment gateway */
     154                'label'   => sprintf( esc_html__( 'Enable %s payment', 'woocommerce-quickpay' ), $this->get_sanitized_method_title() ),
    154155                'default' => 'no'
    155156            ],
    156157            '_Shop_setup'                         => [
    157158                'type'  => 'title',
    158                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     159                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    159160            ],
    160161            'title'                               => [
    161                 'title'       => __( 'Title', 'woo-quickpay' ),
     162                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    162163                'type'        => 'text',
    163                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
     164                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
    164165                'default'     => $this->get_sanitized_method_title(),
    165166            ],
    166167            'description'                         => [
    167                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     168                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    168169                'type'        => 'textarea',
    169                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    170                 'default'     => sprintf( __( 'Pay with %s', 'woo-quickpay' ), $this->get_sanitized_method_title() ),
     170                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     171                /* translators: 1: name of the payment gateway */
     172                'default'     => sprintf( esc_html__( 'Pay with %s', 'woocommerce-quickpay' ), $this->get_sanitized_method_title() ),
    171173            ],
    172174            [
     
    175177            ],
    176178            'checkout_instant_activation'         => [
    177                 'title'       => __( 'Activate subscriptions immediately.', 'woo-quickpay' ),
     179                'title'       => esc_html__( 'Activate subscriptions immediately.', 'woocommerce-quickpay' ),
    178180                'type'        => 'checkbox',
    179                 'label'       => __( 'Enable', 'woo-quickpay' ),
     181                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    180182                'default'     => 'no',
    181                 'description' => __( 'Activates the subscription after the customer authorizes an agreement. <strong>Not suitable for membership pages selling virtual products</strong> as the first payment might take up to 48 hours to either succeed or fail. Read more <a href="https://learn.quickpay.net/helpdesk/da/articles/payment-methods/mobilepay-subscriptions/#oprettelse-af-abonnement" target="_blank">here</a>', 'woo-quickpay' ),
     183                'description' => esc_html__( 'Activates the subscription after the customer authorizes an agreement. <strong>Not suitable for membership pages selling virtual products</strong> as the first payment might take up to 48 hours to either succeed or fail. Read more <a href="https://learn.quickpay.net/helpdesk/da/articles/payment-methods/mobilepay-subscriptions/#oprettelse-af-abonnement" target="_blank">here</a>', 'woocommerce-quickpay' ),
    182184            ],
    183185            'checkout_prefill_phone_number'       => [
    184                 'title'       => __( 'Pre-fill phone number', 'woo-quickpay' ),
     186                'title'       => esc_html__( 'Pre-fill phone number', 'woocommerce-quickpay' ),
    185187                'type'        => 'checkbox',
    186                 'label'       => __( 'Enable', 'woo-quickpay' ),
     188                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    187189                'default'     => 'yes',
    188                 'description' => __( 'When enabled the customer\'s phone number will be used on the MobilePay payment page.', 'woo-quickpay' ),
     190                'description' => esc_html__( 'When enabled the customer\'s phone number will be used on the MobilePay payment page.', 'woocommerce-quickpay' ),
    189191            ],
    190192            [
     
    193195            ],
    194196            'renewal_keep_active'                 => [
    195                 'title'       => __( 'Keep subscription active', 'woo-quickpay' ),
     197                'title'       => esc_html__( 'Keep subscription active', 'woocommerce-quickpay' ),
    196198                'type'        => 'checkbox',
    197                 'label'       => __( 'Enable', 'woo-quickpay' ),
     199                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    198200                'default'     => 'no',
    199                 'description' => __( 'When enabled the subscription will automatically be activated after scheduling the renewal payment. If the payment fails the subscription will be put on-hold.', 'woo-quickpay' ),
     201                'description' => esc_html__( 'When enabled the subscription will automatically be activated after scheduling the renewal payment. If the payment fails the subscription will be put on-hold.', 'woocommerce-quickpay' ),
    200202            ],
    201203            [
    202204                'type'  => 'title',
    203                 'title' => __( 'Agreements', 'woo-quickpay' )
     205                'title' => esc_html__( 'Agreements', 'woocommerce-quickpay' )
    204206            ],
    205207            'mps_transaction_cancellation_status' => [
    206                 'title'             => __( 'Cancelled agreements status', 'woo-quickpay' ),
     208                'title'             => esc_html__( 'Cancelled agreements status', 'woocommerce-quickpay' ),
    207209                'type'              => 'select',
    208210                'class'             => 'wc-enhanced-select',
    209211                'css'               => 'width: 450px;',
    210212                'default'           => 'none',
    211                 'description'       => __( 'Changes subscription status in case of cancelled payment agreement from either the QuickPay manager or the customer\'s MobilePay app', 'woo-quickpay' ),
     213                'description'       => esc_html__( 'Changes subscription status in case of cancelled payment agreement from either the QuickPay manager or the customer\'s MobilePay app', 'woocommerce-quickpay' ),
    212214                'options'           => $this->get_mps_cancel_agreement_status_options(),
    213215                'custom_attributes' => [
    214                     'data-placeholder' => __( 'Select status', 'woo-quickpay' )
     216                    'data-placeholder' => esc_html__( 'Select status', 'woocommerce-quickpay' )
    215217                ]
    216218            ],
     
    220222    private function get_mps_cancel_agreement_status_options() {
    221223        return apply_filters( 'woocommerce_quickpay_mps_cancel_agreement_status_options', [
    222             'none'      => __( 'Do nothing', 'woo-quickpay' ),
     224            'none'      => esc_html__( 'Do nothing', 'woocommerce-quickpay' ),
    223225            'on-hold'   => wc_get_order_status_name( 'on-hold' ),
    224226            'cancelled' => wc_get_order_status_name( 'cancelled' ),
     
    287289        if ( empty( $data['due_date'] ) ) {
    288290            $data['auto_capture_at'] = wp_date( 'Y-m-d', strtotime( 'now + 2 days' ), apply_filters( 'woocommerce_quickpay_mps_timezone', null, $data, $order, $subscription_id ) );
    289             $data['description']     = sprintf( __( 'Payment of #%s', 'woo-quickpay' ), $order->get_order_number() );
     291            /* translators: 1: the order number */
     292            $data['description']     = sprintf( esc_html__( 'Payment of #%s', 'woocommerce-quickpay' ), $order->get_order_number() );
    290293        }
    291294
     
    306309
    307310                if ( $instant_activation && ! $subscription->has_status( 'active' ) ) {
    308                     $subscription->update_status( 'active', __( "'Activate subscriptions immediately.' enabled. Activating subscription due to authorized MobilePay agreement", 'woo-quickpay' ) );
     311                    $subscription->update_status( 'active', esc_html__( "'Activate subscriptions immediately.' enabled. Activating subscription due to authorized MobilePay agreement", 'woocommerce-quickpay' ) );
    309312                    $subscription->save();
    310313                }
     
    355358                '_quickpay_transaction_id' => [
    356359                    'value' => WC_QuickPay_Order_Utils::get_transaction_id( $subscription ),
    357                     'label' => __( 'QuickPay Transaction ID', 'woo-quickpay' ),
     360                    'label' => esc_html__( 'QuickPay Transaction ID', 'woocommerce-quickpay' ),
    358361                ],
    359362            ],
  • woocommerce-quickpay/trunk/classes/instances/mobilepay.php

    r3095043 r3395304  
    3232        $this->form_fields = [
    3333            'enabled'                    => [
    34                 'title'   => __( 'Enable', 'woo-quickpay' ),
     34                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3535                'type'    => 'checkbox',
    36                 'label'   => __( 'Enable MobilePay payment', 'woo-quickpay' ),
     36                'label'   => esc_html__( 'Enable MobilePay payment', 'woocommerce-quickpay' ),
    3737                'default' => 'no',
    3838            ],
    3939            '_Shop_setup'                => [
    4040                'type'  => 'title',
    41                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     41                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4242            ],
    4343            'title'                      => [
    44                 'title'       => __( 'Title', 'woo-quickpay' ),
     44                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4545                'type'        => 'text',
    46                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    47                 'default'     => __( 'MobilePay', 'woo-quickpay' ),
     46                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     47                'default'     => esc_html__( 'MobilePay', 'woocommerce-quickpay' ),
    4848            ],
    4949            'description'                => [
    50                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     50                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5151                'type'        => 'textarea',
    52                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    53                 'default'     => __( 'Pay with your mobile phone', 'woo-quickpay' ),
     52                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     53                'default'     => esc_html__( 'Pay with your mobile phone', 'woocommerce-quickpay' ),
    5454            ]
    5555        ];
  • woocommerce-quickpay/trunk/classes/instances/paypal.php

    r3095043 r3395304  
    3535        $this->form_fields = [
    3636            'enabled'     => [
    37                 'title'   => __( 'Enable', 'woo-quickpay' ),
     37                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3838                'type'    => 'checkbox',
    39                 'label'   => __( 'Enable PayPal payment', 'woo-quickpay' ),
     39                'label'   => esc_html__( 'Enable PayPal payment', 'woocommerce-quickpay' ),
    4040                'default' => 'no'
    4141            ],
    4242            '_Shop_setup' => [
    4343                'type'  => 'title',
    44                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     44                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4545            ],
    4646            'title'       => [
    47                 'title'       => __( 'Title', 'woo-quickpay' ),
     47                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4848                'type'        => 'text',
    49                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    50                 'default'     => __( 'PayPal', 'woo-quickpay' )
     49                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     50                'default'     => esc_html__( 'PayPal', 'woocommerce-quickpay' )
    5151            ],
    5252            'description' => [
    53                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     53                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5454                'type'        => 'textarea',
    55                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    56                 'default'     => __( 'Pay with PayPal', 'woo-quickpay' )
     55                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     56                'default'     => esc_html__( 'Pay with PayPal', 'woocommerce-quickpay' )
    5757            ],
    5858        ];
  • woocommerce-quickpay/trunk/classes/instances/quickpay-extra.php

    r3095043 r3395304  
    3939        $this->form_fields = [
    4040            'enabled'        => [
    41                 'title'   => __( 'Enable', 'woo-quickpay' ),
     41                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    4242                'type'    => 'checkbox',
    43                 'label'   => __( 'Enable Extra QuickPay gateway', 'woo-quickpay' ),
     43                'label'   => esc_html__( 'Enable Extra QuickPay gateway', 'woocommerce-quickpay' ),
    4444                'default' => 'no'
    4545            ],
    4646            '_Shop_setup'    => [
    4747                'type'  => 'title',
    48                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     48                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4949            ],
    5050            'title'          => [
    51                 'title'       => __( 'Title', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    5252                'type'        => 'text',
    53                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'QuickPay', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'QuickPay', 'woocommerce-quickpay' )
    5555            ],
    5656            'description'    => [
    57                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     57                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5858                'type'        => 'textarea',
    59                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    60                 'default'     => __( 'Pay', 'woo-quickpay' )
     59                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     60                'default'     => esc_html__( 'Pay', 'woocommerce-quickpay' )
    6161            ],
    6262            'cardtypelock'   => [
    63                 'title'       => __( 'Payment methods', 'woo-quickpay' ),
     63                'title'       => esc_html__( 'Payment methods', 'woocommerce-quickpay' ),
    6464                'type'        => 'text',
    65                 'description' => __( 'Default: creditcard. Type in the cards you wish to accept (comma separated). See the valid payment types here: <b>https://learn.quickpay.net/tech-talk/appendixes/payment-methods/#payment-methods</b>', 'woo-quickpay' ),
     65                'description' => esc_html__( 'Default: creditcard. Type in the cards you wish to accept (comma separated). See the valid payment types here: <b>https://learn.quickpay.net/tech-talk/appendixes/payment-methods/#payment-methods</b>', 'woocommerce-quickpay' ),
    6666                'default'     => 'creditcard',
    6767            ],
    6868            'quickpay_icons' => [
    69                 'title'             => __( 'Credit card icons', 'woo-quickpay' ),
     69                'title'             => esc_html__( 'Credit card icons', 'woocommerce-quickpay' ),
    7070                'type'              => 'multiselect',
    71                 'description'       => __( 'Choose the card icons you wish to show next to the QuickPay payment option in your shop.', 'woo-quickpay' ),
     71                'description'       => esc_html__( 'Choose the card icons you wish to show next to the QuickPay payment option in your shop.', 'woocommerce-quickpay' ),
    7272                'desc_tip'          => true,
    7373                'class'             => 'wc-enhanced-select',
    7474                'css'               => 'width: 450px;',
    7575                'custom_attributes' => [
    76                     'data-placeholder' => __( 'Select icons', 'woo-quickpay' )
     76                    'data-placeholder' => esc_html__( 'Select icons', 'woocommerce-quickpay' )
    7777                ],
    7878                'default'           => '',
  • woocommerce-quickpay/trunk/classes/instances/resurs.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Resurs payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Resurs payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Resurs', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Resurs', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Resurs', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Resurs', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/trunk/classes/instances/sofort.php

    r3095043 r3395304  
    3434        $this->form_fields = [
    3535            'enabled'     => [
    36                 'title'   => __( 'Enable', 'woo-quickpay' ),
     36                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3737                'type'    => 'checkbox',
    38                 'label'   => __( 'Enable Sofort payment', 'woo-quickpay' ),
     38                'label'   => esc_html__( 'Enable Sofort payment', 'woocommerce-quickpay' ),
    3939                'default' => 'no'
    4040            ],
    4141            '_Shop_setup' => [
    4242                'type'  => 'title',
    43                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     43                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4444            ],
    4545            'title'       => [
    46                 'title'       => __( 'Title', 'woo-quickpay' ),
     46                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4747                'type'        => 'text',
    48                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    49                 'default'     => __( 'Sofort', 'woo-quickpay' )
     48                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     49                'default'     => esc_html__( 'Sofort', 'woocommerce-quickpay' )
    5050            ],
    5151            'description' => [
    52                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     52                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5353                'type'        => 'textarea',
    54                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    55                 'default'     => __( 'Pay with your mobile phone', 'woo-quickpay' )
     54                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     55                'default'     => esc_html__( 'Pay with your mobile phone', 'woocommerce-quickpay' )
    5656            ],
    5757        ];
  • woocommerce-quickpay/trunk/classes/instances/swish.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Swish payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Swish payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Swish', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Swish', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Swish', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Swish', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/trunk/classes/instances/trustly.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Trustly payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Trustly payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Trustly', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Trustly', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Trustly', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Trustly', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/trunk/classes/instances/viabill.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable ViaBill payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable ViaBill payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'ViaBill', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'ViaBill', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with ViaBill', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with ViaBill', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/trunk/classes/instances/vipps.php

    r3095043 r3395304  
    3333        $this->form_fields = [
    3434            'enabled'     => [
    35                 'title'   => __( 'Enable', 'woo-quickpay' ),
     35                'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    3636                'type'    => 'checkbox',
    37                 'label'   => __( 'Enable Vipps payment', 'woo-quickpay' ),
     37                'label'   => esc_html__( 'Enable Vipps payment', 'woocommerce-quickpay' ),
    3838                'default' => 'no'
    3939            ],
    4040            '_Shop_setup' => [
    4141                'type'  => 'title',
    42                 'title' => __( 'Shop setup', 'woo-quickpay' ),
     42                'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    4343            ],
    4444            'title'       => [
    45                 'title'       => __( 'Title', 'woo-quickpay' ),
     45                'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
    4646                'type'        => 'text',
    47                 'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    48                 'default'     => __( 'Vipps', 'woo-quickpay' )
     47                'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     48                'default'     => esc_html__( 'Vipps', 'woocommerce-quickpay' )
    4949            ],
    5050            'description' => [
    51                 'title'       => __( 'Customer Message', 'woo-quickpay' ),
     51                'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    5252                'type'        => 'textarea',
    53                 'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    54                 'default'     => __( 'Pay with Vipps', 'woo-quickpay' )
     53                'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     54                'default'     => esc_html__( 'Pay with Vipps', 'woocommerce-quickpay' )
    5555            ],
    5656        ];
  • woocommerce-quickpay/trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-action.php

    r2924617 r3395304  
    3434     */
    3535    public function validate(): void {
    36         if ( ! $this->is_action_allowed() ) {
    37             wp_send_json_error( __( 'You are not allowed to perform this action', 'woo-quickpay' ) );
     36        $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
     37        if ( ! $this->is_action_allowed() || ! wp_verify_nonce( $nonce, 'manage-woocommerce-quickpay' ) ) {
     38            wp_send_json_error( esc_html__( 'You are not allowed to perform this action', 'woocommerce-quickpay' ) );
    3839        }
    3940
  • woocommerce-quickpay/trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-manage-payment.php

    r2924617 r3395304  
    99    public function execute(): void {
    1010        if ( isset( $_REQUEST['quickpay_action'], $_REQUEST['post'] ) ) {
    11             $param_action = $_REQUEST['quickpay_action'];
    12             $param_post   = $_REQUEST['post'];
     11            $param_action = sanitize_text_field( wp_unslash( $_REQUEST['quickpay_action'] ) );
     12            $param_post   = absint( wp_unslash( $_REQUEST['post'] ) );
    1313
    1414            if ( ! woocommerce_quickpay_can_user_manage_payments( $param_action ) ) {
     
    3434                    if ( method_exists( $payment, $param_action ) ) {
    3535                        // Fetch amount if sent.
    36                         $amount = isset( $_REQUEST['quickpay_amount'] ) ? WC_QuickPay_Helper::price_custom_to_multiplied( $_REQUEST['quickpay_amount'], $payment->get_currency() ) : $payment->get_remaining_balance();
     36                        $amount = isset( $_REQUEST['quickpay_amount'] ) ? WC_QuickPay_Helper::price_custom_to_multiplied( sanitize_text_field( $_REQUEST['quickpay_amount'] ), $payment->get_currency() ) : $payment->get_remaining_balance();
    3737
    3838                        // Call the action method and parse the transaction id and order object
     
    4343                } // The action was not allowed. Throw an exception
    4444                else {
    45                     throw new QuickPay_API_Exception( sprintf( "Action: \"%s\", is not allowed for order #%d, with type state \"%s\"", $param_action, WC_QuickPay_Order_Utils::get_clean_order_number( $order ), $payment->get_current_type() ) );
     45                    throw new QuickPay_API_Exception( sprintf( 'Action: \"%1$s\", is not allowed for order #%2$d, with type state \"%3$s\"', $param_action, WC_QuickPay_Order_Utils::get_clean_order_number( $order ), $payment->get_current_type() ) );
    4646                }
    4747            } catch ( QuickPay_Exception $e ) {
  • woocommerce-quickpay/trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-ping.php

    r2924617 r3395304  
    1010        if ( ! empty( $_POST['api_key'] ) ) {
    1111            try {
    12                 $api = new WC_QuickPay_API( sanitize_text_field( $_POST['api_key'] ) );
     12                $api = new WC_QuickPay_API( sanitize_text_field( wp_unslash($_POST['api_key']) ) );
    1313                $api->get( '/payments?page_size=1' );
    1414                wp_send_json_success();
  • woocommerce-quickpay/trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-private-key.php

    r2924617 r3395304  
    1010        try {
    1111            if ( empty( $_POST['api_key'] ) ) {
    12                 throw new \Exception( __( 'Please type in the API key before requesting a private key', 'woo-quickpay' ) );
     12                throw new \Exception( esc_html__( 'Please type in the API key before requesting a private key', 'woocommerce-quickpay' ) );
    1313            }
    1414
    15             if ( ! current_user_can( 'manage_woocommerce' ) ) {
    16                 throw new \Exception( __( 'You are not authorized to perform this action.', 'woo-quickpay' ) );
     15            $nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] )) : '';
     16
     17            if ( ! current_user_can( 'manage_woocommerce' ) || ! wp_verify_nonce( $nonce, 'manage-woocommerce-quickpay' ) ) {
     18                throw new \Exception( esc_html__( 'You are not authorized to perform this action.', 'woocommerce-quickpay' ) );
    1719            }
    1820
    19             $api_key = $_POST['api_key'];
     21            $api_key = sanitize_text_field( wp_unslash( $_POST['api_key'] ) );
    2022
    2123            $api = new WC_QuickPay_API( $api_key );
  • woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-admin-orders-lists-table.php

    r3079637 r3395304  
    4040    public function filter_shop_order_posts_columns( $show_columns ): array {
    4141        $column_name   = 'quickpay_transaction_info';
    42         $column_header = __( 'Payment', 'woo-quickpay' );
     42        $column_header = esc_html__( 'Payment', 'woocommerce-quickpay' );
    4343
    4444        return WC_QuickPay_Helper::array_insert_after( 'shipping_address', $show_columns, $column_name, $column_header );
     
    8080                        'transaction_brand'          => $brand,
    8181                        'transaction_brand_logo_url' => WC_QuickPay_Helper::get_payment_type_logo( $brand ?: $transaction->get_acquirer() ),
    82                         'transaction_status'         => WC_QuickPay_Order_Utils::is_failed_renewal( $order ) ? __( 'Failed renewal', 'woo-quickpay' ) : $transaction->get_current_type(),
     82                        'transaction_status'         => WC_QuickPay_Order_Utils::is_failed_renewal( $order ) ? esc_html__( 'Failed renewal', 'woocommerce-quickpay' ) : $transaction->get_current_type(),
    8383                        'transaction_is_test'        => $transaction->is_test(),
    8484                        'is_cached'                  => $transaction->is_loaded_from_cached(),
     
    9898    public function order_bulk_actions( array $actions ): array {
    9999        if ( apply_filters( 'woocommerce_quickpay_allow_orders_bulk_actions', current_user_can( 'manage_woocommerce' ) ) ) {
    100             $actions['quickpay_capture_recurring']   = __( 'QuickPay: Capture payment and activate subscription', 'woo-quickpay' );
    101             $actions['quickpay_create_payment_link'] = __( 'QuickPay: Create payment link', 'woo-quickpay' );
     100            $actions['quickpay_capture_recurring']   = esc_html__( 'QuickPay: Capture payment and activate subscription', 'woocommerce-quickpay' );
     101            $actions['quickpay_create_payment_link'] = esc_html__( 'QuickPay: Create payment link', 'woocommerce-quickpay' );
    102102        }
    103103
     
    112112    public function subscription_bulk_actions( array $actions ): array {
    113113        if ( apply_filters( 'woocommerce_quickpay_allow_subscriptions_bulk_actions', current_user_can( 'manage_woocommerce' ) ) ) {
    114             $actions['quickpay_create_payment_link'] = __( 'QuickPay: Create payment link', 'woo-quickpay' );
     114            $actions['quickpay_create_payment_link'] = esc_html__( 'QuickPay: Create payment link', 'woocommerce-quickpay' );
    115115        }
    116116
     
    133133
    134134            // Redirect client
    135             wp_redirect( $_SERVER['HTTP_REFERER'] );
     135            wp_safe_redirect( wp_unslash($_SERVER['HTTP_REFERER'] ?? $redirect_to) );
    136136            exit;
    137137        }
     
    149149
    150150            if ( $changed ) {
    151                 woocommerce_quickpay_add_admin_notice( sprintf( __( 'Payment links created for %d orders.', 'woo-quickpay' ), $changed ) );
    152             }
    153 
    154             wp_redirect( $_SERVER['HTTP_REFERER'] );
     151                /* translators: 1: count of orders handled  */
     152                woocommerce_quickpay_add_admin_notice( sprintf( esc_html__( 'Payment links created for %d orders.', 'woocommerce-quickpay' ), $changed ) );
     153            }
     154
     155            wp_safe_redirect( wp_unslash($_SERVER['HTTP_REFERER'] ?? $redirect_to) );
    155156            exit;
    156157        }
     
    180181
    181182            if ( $changed ) {
    182                 woocommerce_quickpay_add_admin_notice( sprintf( __( 'Payment links created for %d subscriptions.', 'woo-quickpay' ), $changed ) );
    183             }
    184 
    185             wp_redirect( $_SERVER['HTTP_REFERER'] );
     183                /* translators: 1: count of subscriptions handled */
     184                woocommerce_quickpay_add_admin_notice( sprintf( esc_html__( 'Payment links created for %d subscriptions.', 'woocommerce-quickpay' ), $changed ) );
     185            }
     186
     187            wp_safe_redirect( wp_unslash($_SERVER['HTTP_REFERER'] ?? $redirect_to) );
    186188            exit;
    187189        }
  • woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-admin-orders-meta.php

    r2924617 r3395304  
    2828        if ( WC_QuickPay_Requests_Utils::is_current_admin_screen( $screen_orders, $screen_subs ) ) {
    2929            if ( ( $order = woocommerce_quickpay_get_order( $post_or_order ) ) && WC_QuickPay_Order_Payments_Utils::is_order_using_quickpay( $order ) ) {
    30                 add_meta_box( 'quickpay-payment-actions', __( 'QuickPay Payment', 'woo-quickpay' ), [ $this, 'meta_box_payment', ], $screen_orders, 'side', 'high' );
    31                 add_meta_box( 'quickpay-payment-actions', __( 'QuickPay Subscription', 'woo-quickpay' ), [ $this, 'meta_box_subscription', ], $screen_subs, 'side', 'high' );
     30                add_meta_box( 'quickpay-payment-actions', esc_html__( 'QuickPay Payment', 'woocommerce-quickpay' ), [ $this, 'meta_box_payment', ], $screen_orders, 'side', 'high' );
     31                add_meta_box( 'quickpay-payment-actions', esc_html__( 'QuickPay Subscription', 'woocommerce-quickpay' ), [ $this, 'meta_box_subscription', ], $screen_subs, 'side', 'high' );
    3232            }
    3333        }
     
    125125                $state = $transaction->get_state();
    126126                try {
    127                     $status = $transaction->get_current_type() . ' (' . __( 'subscription', 'woo-quickpay' ) . ')';
     127                    $status = $transaction->get_current_type() . ' (' . esc_html__( 'subscription', 'woocommerce-quickpay' ) . ')';
    128128                } catch ( QuickPay_API_Exception $e ) {
    129129                    if ( 'initial' !== $state ) {
  • woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-admin-orders.php

    r2932188 r3395304  
    3535        // By default, we will skip payment link creation if the order is paid already.
    3636        if ( ! apply_filters( 'woocommerce_quickpay_order_action_create_payment_link_for_order', ! $order->is_paid(), $order ) ) {
    37             woocommerce_quickpay_add_admin_notice( sprintf( __( 'Payment link creation skipped for order #%s', 'woo-quickpay' ), $order->get_id() ), 'error' );
     37            /* translators: 1: the order id */
     38            woocommerce_quickpay_add_admin_notice( sprintf( esc_html__( 'Payment link creation skipped for order #%s', 'woocommerce-quickpay' ), $order->get_id() ), 'error' );
    3839
    3940            return;
     
    5152
    5253                if ( ! $order_parent_id = $resource_order->get_parent_id() ) {
    53                     throw new QuickPay_Exception( __( 'A parent order must be mapped to the subscription.', 'woo-quickpay' ) );
     54                    throw new QuickPay_Exception( esc_html__( 'A parent order must be mapped to the subscription.', 'woocommerce-quickpay' ) );
    5455                }
    5556                $resource_order = wc_get_order( $order_parent_id );
     
    103104            // Check URL
    104105            if ( ! WC_QuickPay_Helper::is_url( $link->url ) ) {
    105                 throw new Exception( sprintf( __( 'Invalid payment link received from API for order #%s', 'woo-quickpay' ), $order->get_id() ) );
     106                /* translators: 1: the order id */
     107                throw new Exception( sprintf( esc_html__( 'Invalid payment link received from API for order #%s', 'woocommerce-quickpay' ), $order->get_id() ) );
    106108            }
    107109
     
    118120            // Make sure to save the changes to the order/subscription object
    119121            $order->save();
    120             $order->add_order_note( sprintf( __( 'Payment link manually created from backend: %s', 'woo-quickpay' ), $link->url ), false, true );
     122            /* translators: 1: Payment link url */
     123            $order->add_order_note( sprintf( esc_html__( 'Payment link manually created from backend: %s', 'woocommerce-quickpay' ), $link->url ), false, true );
    121124
    122125            do_action( 'woocommerce_quickpay_order_action_payment_link_created', $link->url, $order );
     
    124127            return true;
    125128        } catch ( Exception $e ) {
    126             woocommerce_quickpay_add_admin_notice( sprintf( __( 'Payment link could not be created for order #%s. Error: %s', 'woo-quickpay' ), $order->get_id(), $e->getMessage() ), 'error' );
     129            /* translators: 1: order id, 2: error message */
     130            woocommerce_quickpay_add_admin_notice( sprintf( esc_html__( 'Payment link could not be created for order #%1$s. Error: %2$s', 'woocommerce-quickpay' ), $order->get_id(), $e->getMessage() ), 'error' );
    127131
    128132            return false;
     
    153157     */
    154158    public function admin_order_actions( $actions ) {
    155         $actions['quickpay_create_payment_link'] = __( 'Create payment link', 'woo-quickpay' );
     159        $actions['quickpay_create_payment_link'] = esc_html__( 'Create payment link', 'woocommerce-quickpay' );
    156160
    157161        return $actions;
  • woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-orders.php

    r2924617 r3395304  
    2727                    if ( $transaction->is_action_allowed( 'cancel' ) ) {
    2828                        $transaction->cancel( $transaction_id );
    29                         $order->add_order_note( __( 'QuickPay: Payment cancelled due to order cancellation', 'woo-quickpay' ) );
     29                        $order->add_order_note( esc_html__( 'QuickPay: Payment cancelled due to order cancellation', 'woocommerce-quickpay' ) );
    3030                    }
    3131                } catch ( Exception $e ) {
     
    5555
    5656        if ( ! $is_mp_subscription && $autocomplete_renewal_orders && WC_QuickPay_Subscription::is_renewal( $order ) ) {
    57             $order->update_status( 'completed', __( 'Automatically completing order status due to successful recurring payment', 'woo-quickpay' ) );
     57            $order->update_status( 'completed', esc_html__( 'Automatically completing order status due to successful recurring payment', 'woocommerce-quickpay' ) );
    5858        }
    5959    }
  • woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-subscriptions-change-payment-method.php

    r2924617 r3395304  
    2020    public function maybe_apply_description_notice( ?string $description, string $gateway_id ): ?string {
    2121        if ( $gateway_id === WC_QP()->id && is_checkout() && wc_string_to_bool( WC_QP()->s( 'subscription_update_card_on_manual_renewal_payment' ) ) && WC_QuickPay_Subscription::cart_contains_renewal() ) {
    22             $description .= __( '<p><strong>NB:</strong> This will pay your order and update the credit card on your subscription for future payments.</p>', 'woo-quickpay' );
     22            $description .= sprintf(
     23                '<p><strong>%s</strong> %s</p>',
     24                esc_html__( 'NB:', 'woocommerce-quickpay' ),
     25                esc_html__( 'This will pay your order and update the credit card on your subscription for future payments.', 'woocommerce-quickpay' )
     26            );
    2327        }
    2428
  • woocommerce-quickpay/trunk/classes/updates/woocommerce-quickpay-update-4.6.php

    r2924617 r3395304  
    5151                }
    5252
    53                 $logger->add( sprintf( 'Migrated transaction (%d) from parent order ID: %s to subscription order ID: %s', $transaction_id, $subscription_id, $order_id ) );
     53                $logger->add( sprintf( 'Migrated transaction (%1$d) from parent order ID: %2$s to subscription order ID: %3$s', $transaction_id, $subscription_id, $order_id ) );
    5454            } catch ( WC_Data_Exception|QuickPay_API_Exception $e ) {
    55                 $logger->add( sprintf( 'Failed migration of transaction (%d) from parent order ID: %s to subscription order ID: %s. Error: %s', $transaction_id, $subscription_id, $order_id, $e->getMessage() ) );
     55                $logger->add( sprintf( 'Failed migration of transaction (%1$d) from parent order ID: %2$s to subscription order ID: %3$s. Error: %4$s', $transaction_id, $subscription_id, $order_id, $e->getMessage() ) );
    5656            }
    5757        }
  • woocommerce-quickpay/trunk/classes/utils/woocommerce-quickpay-order-payments-utils.php

    r3250888 r3395304  
    6464            $fee = new WC_Order_Item_Fee();
    6565
    66             $fee->set_name( __( 'Payment Fee', 'woo-quickpay' ) );
     66            $fee->set_name( __( 'Payment Fee', 'woocommerce-quickpay' ) );
    6767            $fee->set_total( $fee_in_cents / 100 );
    6868            $fee->set_tax_status( 'none' );
  • woocommerce-quickpay/trunk/classes/utils/woocommerce-quickpay-order-transaction-data-utils.php

    r3250888 r3395304  
    109109        // Single: Order Email
    110110        if ( in_array( 'customer_email', $custom_vars_settings, true ) ) {
    111             $custom_vars[ __( 'Customer Email', 'woo-quickpay' ) ] = $order->get_billing_email();
     111            $custom_vars[ esc_html__( 'Customer Email', 'woocommerce-quickpay' ) ] = $order->get_billing_email();
    112112        }
    113113
    114114        // Single: Order Phone
    115115        if ( in_array( 'customer_phone', $custom_vars_settings, true ) ) {
    116             $custom_vars[ __( 'Customer Phone', 'woo-quickpay' ) ] = $order->get_billing_phone();
     116            $custom_vars[ esc_html__( 'Customer Phone', 'woocommerce-quickpay' ) ] = $order->get_billing_phone();
    117117        }
    118118
    119119        // Single: Browser User Agent
    120120        if ( in_array( 'browser_useragent', $custom_vars_settings, true ) ) {
    121             $custom_vars[ __( 'User Agent', 'woo-quickpay' ) ] = $order->get_customer_user_agent();
     121            $custom_vars[ esc_html__( 'User Agent', 'woocommerce-quickpay' ) ] = $order->get_customer_user_agent();
    122122        }
    123123
    124124        // Single: Shipping Method
    125125        if ( in_array( 'shipping_method', $custom_vars_settings, true ) ) {
    126             $custom_vars[ __( 'Shipping Method', 'woo-quickpay' ) ] = $order->get_shipping_method();
     126            $custom_vars[ esc_html__( 'Shipping Method', 'woocommerce-quickpay' ) ] = $order->get_shipping_method();
    127127        }
    128128
  • woocommerce-quickpay/trunk/classes/woocommerce-quickpay-callbacks.php

    r3250888 r3395304  
    2424                $order->set_transaction_id( $transaction->id );
    2525            } catch ( WC_Data_Exception $e ) {
    26                 WC_QP()->log->add( __( 'An error occured while setting transaction id: %d on order %s. %s', $transaction->id, $order->get_id(), $e->getMessage() ) );
     26                WC_QP()->log->add( sprintf( 'An error occured while setting transaction id: %1$d on order %2$s. %3$s', $transaction->id, $order->get_id(), $e->getMessage() ) );
    2727            }
    2828            WC_Pre_Orders_Order::mark_order_as_pre_ordered( $order );
     
    3838
    3939        // Write a note to the order history
    40         WC_QuickPay_Order_Utils::add_note( $order, sprintf( __( 'Payment authorized. Transaction ID: %s', 'woo-quickpay' ), $transaction->id ) );
     40        /* translators: 1: Transaction ID */
     41        WC_QuickPay_Order_Utils::add_note( $order, sprintf( esc_html__( 'Payment authorized. Transaction ID: %s', 'woocommerce-quickpay' ), $transaction->id ) );
    4142
    4243        // Fallback to save transaction IDs since this has seemed to sometimes fail when using WC_Order::payment_complete
     
    5354     */
    5455    public static function payment_captured( WC_Order $order, $transaction ) {
    55         $capture_note = __( 'Payment captured.', 'woo-quickpay' );
     56        $capture_note = esc_html__( 'Payment captured.', 'woocommerce-quickpay' );
    5657
    5758        $complete = WC_QuickPay_Helper::option_is_enabled( WC_QP()->s( 'quickpay_complete_on_capture' ) ) && ! $order->has_status( 'completed' );
     
    8788        // Allow 3rd party code to overwrite the note
    8889        $transition_status_note = apply_filters( 'woocommerce_quickpay_payment_cancelled_order_transition_status_note',
    89             __( 'Payment cancelled.', 'woo-quickpay' ),
     90            __( 'Payment cancelled.', 'woocommerce-quickpay' ),
    9091            $order,
    9192            $transaction,
     
    112113     */
    113114    public static function subscription_authorized( $subscription, WC_Order $related_order, $transaction ): void {
    114         WC_QuickPay_Order_Utils::add_note( $subscription, sprintf( __( 'Subscription authorized. Transaction ID: %s', 'woo-quickpay' ), $transaction->id ) );
     115        /* translators: 1: Subscription transaction id */
     116        WC_QuickPay_Order_Utils::add_note( $subscription, sprintf( esc_html__( 'Subscription authorized. Transaction ID: %s', 'woocommerce-quickpay' ), $transaction->id ) );
    115117        // Activate the subscription
    116118
     
    197199
    198200        if ( isset( $_GET['order_post_id'] ) ) {
    199             return (int) trim( $_GET['order_post_id'] );
     201            return absint( trim( sanitize_text_field( wp_unslash( $_GET['order_post_id'] ) ) ) );
    200202        }
    201203
     
    221223
    222224        if ( isset( $_GET['subscription_post_id'] ) ) {
    223             return (int) trim( $_GET['subscription_post_id'] );
     225            return absint( trim( sanitize_text_field( wp_unslash( $_GET['subscription_post_id'] ) ) ) );
    224226        }
    225227
  • woocommerce-quickpay/trunk/classes/woocommerce-quickpay-exceptions.php

    r3095043 r3395304  
    6868     */
    6969    public function write_standard_warning(): void {
    70         printf(
    71             wp_kses(
    72                 __( "An error occurred. For more information check out the <strong>%s</strong> logs inside <strong>WooCommerce -> System Status -> Logs</strong>.", 'woo-quickpay' ), [ 'strong' => [] ]
    73             ),
     70        echo wp_kses_post(sprintf(
     71            /* translators: 1: The text domain */
     72            __( "An error occurred. For more information check out the <strong>%s</strong> logs inside <strong>WooCommerce -> System Status -> Logs</strong>.", 'woocommerce-quickpay' ),
    7473            $this->log->get_domain()
    75         );
     74        ));
    7675    }
    7776}
  • woocommerce-quickpay/trunk/classes/woocommerce-quickpay-helper.php

    r3045559 r3395304  
    124124            wp_enqueue_script( 'quickpay-backend', plugins_url( '/assets/javascript/backend.js', __DIR__ ), [ 'jquery' ], self::static_version() );
    125125            wp_localize_script( 'quickpay-backend', 'quickpayBackend', [
    126                 'ajax_url' => WC_QuickPay_Admin_Ajax::get_instance()->get_base_url()
     126                'ajax_url' => WC_QuickPay_Admin_Ajax::get_instance()->get_base_url(),
     127                'nonce'    => wp_create_nonce( 'manage-woocommerce-quickpay' ),
    127128            ] );
    128129        }
     
    136137     */
    137138    protected static function maybe_enqueue_admin_statics(): bool {
    138         global $post;
    139139        /**
    140140         * Enqueue on the settings page for the gateways
    141141         */
    142142        if ( isset( $_GET['page'], $_GET['tab'], $_GET['section'] ) ) {
    143             if ( $_GET['page'] === 'wc-settings' && $_GET['tab'] === 'checkout' && array_key_exists( $_GET['section'], array_merge( [ 'quickpay' => null ], WC_QuickPay::get_gateway_instances() ) ) ) {
     143            if ( $_GET['page'] === 'wc-settings' && $_GET['tab'] === 'checkout' && array_key_exists( sanitize_text_field( wp_unslash( $_GET['section'] ) ), array_merge( [ 'quickpay' => null ], WC_QuickPay::get_gateway_instances() ) ) ) {
    144144                return true;
    145145            }
     
    177177     */
    178178    public static function load_i18n() {
    179         load_plugin_textdomain( 'woo-quickpay', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' );
     179        load_plugin_textdomain( 'woocommerce-quickpay', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' );
    180180    }
    181181
     
    324324     */
    325325    public static function spamshield_bypass_security_check( $bypass ) {
    326         return isset( $_GET['wc-api'] ) && strtolower( $_GET['wc-api'] ) === 'wc_quickpay';
     326        return isset( $_GET['wc-api'] ) && strtolower( sanitize_text_field( wp_unslash( $_GET['wc-api'] ) ) ) === 'wc_quickpay';
    327327    }
    328328
     
    369369        }
    370370
    371         $u_agent = $_SERVER['HTTP_USER_AGENT'];
     371        $u_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) );
    372372        $name    = 'Unknown';
    373373
  • woocommerce-quickpay/trunk/classes/woocommerce-quickpay-install.php

    r2459034 r3395304  
    142142     */
    143143    public static function ajax_run_upgrader() {
    144         $nonce = isset( $_POST['nonce'] ) ? $_POST['nonce'] : null;
     144        $nonce = isset( $_POST['nonce'] ) ? sanitize_text_field(wp_unslash($_POST['nonce'])) : null;
    145145
    146         if ( ! wp_verify_nonce( $nonce, 'woocommerce-quickpay-run-upgrader-nonce' ) && ! current_user_can( 'administrator' ) ) {
    147             echo json_encode( [ 'status' => 'error', 'message' => __( 'You are not authorized to perform this action', 'woo-quickpay' ) ] );
     146        if ( empty( $nonce ) || ! wp_verify_nonce(  $nonce , 'woocommerce-quickpay-run-upgrader-nonce' ) || ! current_user_can( 'administrator' ) ) {
     147            echo wp_json_encode( [ 'status' => 'error', 'message' => __( 'You are not authorized to perform this action', 'woocommerce-quickpay' ) ] );
    148148            exit;
    149149        }
     
    151151        self::update();
    152152
    153         echo json_encode( [ 'status' => 'success' ] );
     153        echo wp_json_encode( [ 'status' => 'success' ] );
    154154
    155155        exit;
  • woocommerce-quickpay/trunk/classes/woocommerce-quickpay-log.php

    r3076215 r3395304  
    6161
    6262        if ( is_array( $param ) ) {
    63             $message .= print_r( $param, true );
     63            $message .= wp_json_encode( $param, JSON_PRETTY_PRINT );
    6464        }
    6565
     
    110110     */
    111111    public function get_admin_link() {
    112         if ( defined('WC_VERSION')) {
    113             if (version_compare(WC_VERSION, '8.6', '>=')) {
     112        if ( defined( 'WC_VERSION' ) ) {
     113            if ( version_compare( WC_VERSION, '8.6', '>=' ) ) {
    114114                $args = [
    115                     'page'     => 'wc-status',
    116                     'tab'      => 'logs',
     115                    'page'   => 'wc-status',
     116                    'tab'    => 'logs',
    117117                    'source' => $this->_domain
    118118                ];
  • woocommerce-quickpay/trunk/classes/woocommerce-quickpay-settings.php

    r3394934 r3395304  
    2424            [
    2525                'enabled' => [
    26                     'title'   => __( 'Enable', 'woo-quickpay' ),
     26                    'title'   => esc_html__( 'Enable', 'woocommerce-quickpay' ),
    2727                    'type'    => 'checkbox',
    28                     'label'   => __( 'Enable Quickpay Payment', 'woo-quickpay' ),
     28                    'label'   => esc_html__( 'Enable Quickpay Payment', 'woocommerce-quickpay' ),
    2929                    'default' => 'yes'
    3030                ],
     
    3232                '_Account_setup'               => [
    3333                    'type'  => 'title',
    34                     'title' => __( 'API - Integration', 'woo-quickpay' ),
     34                    'title' => esc_html__( 'API - Integration', 'woocommerce-quickpay' ),
    3535                ],
    3636                'quickpay_apikey'              => [
    37                     'title'       => __( 'Api User key', 'woo-quickpay' ) . self::get_required_symbol(),
    38                     'type'        => 'text',
    39                     'description' => __( 'Your API User\'s key. Create a separate API user in the "Users" tab inside the Quickpay manager.', 'woo-quickpay' ),
     37                    'title'       => esc_html__( 'Api User key', 'woocommerce-quickpay' ) . self::get_required_symbol(),
     38                    'type'        => 'text',
     39                    'description' => esc_html__( 'Your API User\'s key. Create a separate API user in the "Users" tab inside the Quickpay manager.', 'woocommerce-quickpay' ),
    4040                    'desc_tip'    => true,
    4141                ],
    4242                'quickpay_privatekey'          => [
    43                     'title'       => __( 'Private key', 'woo-quickpay' ) . self::get_required_symbol(),
    44                     'type'        => 'text',
    45                     'description' => __( 'Your agreement private key. Found in the "Integration" tab inside the Quickpay manager.', 'woo-quickpay' ),
     43                    'title'       => esc_html__( 'Private key', 'woocommerce-quickpay' ) . self::get_required_symbol(),
     44                    'type'        => 'text',
     45                    'description' => esc_html__( 'Your agreement private key. Found in the "Integration" tab inside the Quickpay manager.', 'woocommerce-quickpay' ),
    4646                    'desc_tip'    => true,
    4747                ],
    4848                '_Autocapture'                 => [
    4949                    'type'  => 'title',
    50                     'title' => __( 'Autocapture settings', 'woo-quickpay' )
     50                    'title' => esc_html__( 'Autocapture settings', 'woocommerce-quickpay' )
    5151                ],
    5252                'quickpay_autocapture'         => [
    53                     'title'       => __( 'Physical products (default)', 'woo-quickpay' ),
    54                     'type'        => 'checkbox',
    55                     'label'       => __( 'Enable', 'woo-quickpay' ),
    56                     'description' => __( 'Automatically capture payments on physical products.', 'woo-quickpay' ),
     53                    'title'       => esc_html__( 'Physical products (default)', 'woocommerce-quickpay' ),
     54                    'type'        => 'checkbox',
     55                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     56                    'description' => esc_html__( 'Automatically capture payments on physical products.', 'woocommerce-quickpay' ),
    5757                    'default'     => 'no',
    5858                    'desc_tip'    => false,
    5959                ],
    6060                'quickpay_autocapture_virtual' => [
    61                     'title'       => __( 'Virtual products', 'woo-quickpay' ),
    62                     'type'        => 'checkbox',
    63                     'label'       => __( 'Enable', 'woo-quickpay' ),
    64                     'description' => __( 'Automatically capture payments on virtual products. If the order contains both physical and virtual products, this setting will be overwritten by the default setting above.', 'woo-quickpay' ),
     61                    'title'       => esc_html__( 'Virtual products', 'woocommerce-quickpay' ),
     62                    'type'        => 'checkbox',
     63                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     64                    'description' => esc_html__( 'Automatically capture payments on virtual products. If the order contains both physical and virtual products, this setting will be overwritten by the default setting above.', 'woocommerce-quickpay' ),
    6565                    'default'     => 'no',
    6666                    'desc_tip'    => false,
     
    6868                '_caching'                     => [
    6969                    'type'  => 'title',
    70                     'title' => __( 'Transaction Cache', 'woo-quickpay' )
     70                    'title' => esc_html__( 'Transaction Cache', 'woocommerce-quickpay' )
    7171                ],
    7272                'quickpay_caching_enabled'     => [
    73                     'title'       => __( 'Enable Caching', 'woo-quickpay' ),
    74                     'type'        => 'checkbox',
    75                     'description' => __( 'Caches transaction data to improve application and web-server performance. <strong>Recommended.</strong>', 'woo-quickpay' ),
     73                    'title'       => esc_html__( 'Enable Caching', 'woocommerce-quickpay' ),
     74                    'type'        => 'checkbox',
     75                    'description' => wp_kses( __( 'Caches transaction data to improve application and web-server performance. <strong>Recommended.</strong>', 'woocommerce-quickpay' ), [ 'strong' => [] ] ),
    7676                    'default'     => 'yes',
    7777                    'desc_tip'    => false,
    7878                ],
    7979                'quickpay_caching_expiration'  => [
    80                     'title'       => __( 'Cache Expiration', 'woo-quickpay' ),
    81                     'label'       => __( 'Cache Expiration', 'woo-quickpay' ),
     80                    'title'       => esc_html__( 'Cache Expiration', 'woocommerce-quickpay' ),
     81                    'label'       => esc_html__( 'Cache Expiration', 'woocommerce-quickpay' ),
    8282                    'type'        => 'number',
    83                     'description' => __( '<strong>Time in seconds</strong> for how long a transaction should be cached. <strong>Default: 604800 (7 days).</strong>', 'woo-quickpay' ),
     83                    'description' => wp_kses_post( '<strong>Time in seconds</strong> for how long a transaction should be cached. <strong>Default: 604800 (7 days).</strong>', 'woocommerce-quickpay' ),
    8484                    'default'     => 7 * DAY_IN_SECONDS,
    8585                    'desc_tip'    => false,
     
    8888                '_Extra_gateway_settings' => [
    8989                    'type'  => 'title',
    90                     'title' => __( 'Extra gateway settings', 'woo-quickpay' )
     90                    'title' => esc_html__( 'Extra gateway settings', 'woocommerce-quickpay' )
    9191                ],
    9292                'quickpay_cardtypelock'   => [
    93                     'title'       => __( 'Payment methods', 'woo-quickpay' ),
    94                     'type'        => 'text',
    95                     'description' => __( 'Default: creditcard. Type in the cards you wish to accept (comma separated). See the valid payment types here: <b>https://learn.quickpay.net/tech-talk/appendixes/payment-methods/#payment-methods</b>', 'woo-quickpay' ),
     93                    'title'       => esc_html__( 'Payment methods', 'woocommerce-quickpay' ),
     94                    'type'        => 'text',
     95                    'description' => wp_kses_post( 'Default: creditcard. Type in the cards you wish to accept (comma separated). See the valid payment types here: <b>https://learn.quickpay.net/tech-talk/appendixes/payment-methods/#payment-methods</b>', 'woocommerce-quickpay' ),
    9696                    'default'     => 'creditcard',
    9797                ],
    9898                'quickpay_branding_id'    => [
    99                     'title'       => __( 'Branding ID', 'woo-quickpay' ),
    100                     'type'        => 'text',
    101                     'description' => __( 'Leave empty if you have no custom branding options', 'woo-quickpay' ),
     99                    'title'       => esc_html__( 'Branding ID', 'woocommerce-quickpay' ),
     100                    'type'        => 'text',
     101                    'description' => esc_html__( 'Leave empty if you have no custom branding options', 'woocommerce-quickpay' ),
    102102                    'default'     => '',
    103103                    'desc_tip'    => true,
     
    105105
    106106                'quickpay_autofee'                                   => [
    107                     'title'       => __( 'Enable autofee', 'woo-quickpay' ),
    108                     'type'        => 'checkbox',
    109                     'label'       => __( 'Enable', 'woo-quickpay' ),
    110                     'description' => __( 'Fees are charged according to the applicable rules for card fees, contact your redeemer for more information.', 'woo-quickpay' ),
     107                    'title'       => esc_html__( 'Enable autofee', 'woocommerce-quickpay' ),
     108                    'type'        => 'checkbox',
     109                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     110                    'description' => esc_html__( 'Fees are charged according to the applicable rules for card fees, contact your redeemer for more information.', 'woocommerce-quickpay' ),
    111111                    'default'     => 'no',
    112112                    'desc_tip'    => true,
    113113                ],
    114114                'quickpay_captureoncomplete'                         => [
    115                     'title'       => __( 'Capture on complete', 'woo-quickpay' ),
    116                     'type'        => 'checkbox',
    117                     'label'       => __( 'Enable', 'woo-quickpay' ),
    118                     'description' => __( 'When enabled quickpay payments will automatically be captured when order state is set to "Complete".', 'woo-quickpay' ),
    119                     'default'     => 'no',
    120                     'desc_tip'    => true,
    121                 ],
    122                 'quickpay_complete_on_capture'          => [
    123                     'title'       => __( 'Complete order on capture callbacks', 'woo-quickpay' ),
    124                     'type'        => 'checkbox',
    125                     'label'       => __( 'Enable', 'woo-quickpay' ),
    126                     'description' => __( 'When enabled, an order will be automatically completed when capture callbacks are sent to WooCommerce. Callbacks are sent by Quickpay when the payment is captured from either the shop or the Quickpay manager. Keep disabled to manually complete orders. ', 'woo-quickpay' ),
     115                    'title'       => esc_html__( 'Capture on complete', 'woocommerce-quickpay' ),
     116                    'type'        => 'checkbox',
     117                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     118                    'description' => esc_html__( 'When enabled quickpay payments will automatically be captured when order state is set to "Complete".', 'woocommerce-quickpay' ),
     119                    'default'     => 'no',
     120                    'desc_tip'    => true,
     121                ],
     122                'quickpay_complete_on_capture'                       => [
     123                    'title'       => esc_html__( 'Complete order on capture callbacks', 'woocommerce-quickpay' ),
     124                    'type'        => 'checkbox',
     125                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     126                    'description' => esc_html__( 'When enabled, an order will be automatically completed when capture callbacks are sent to WooCommerce. Callbacks are sent by Quickpay when the payment is captured from either the shop or the Quickpay manager. Keep disabled to manually complete orders. ', 'woocommerce-quickpay' ),
    127127                    'default'     => 'no',
    128128                ],
    129129                'quickpay_payment_cancelled_order_transition_status' => [
    130                     'title'       => __( 'Order status update on payment cancellation', 'woo-quickpay' ),
     130                    'title'       => esc_html__( 'Order status update on payment cancellation', 'woocommerce-quickpay' ),
    131131                    'type'        => 'select',
    132132                    'options'     => self::get_payment_cancelled_order_transition_statuses(),
    133                     'label'       => __( 'Enable', 'woo-quickpay' ),
    134                     'description' => __( 'When activated, orders linked to payments will change to the chosen status if the merchant cancels the payment.', 'woo-quickpay' ),
     133                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     134                    'description' => esc_html__( 'When activated, orders linked to payments will change to the chosen status if the merchant cancels the payment.', 'woocommerce-quickpay' ),
    135135                    'default'     => 'no',
    136136                ],
    137137                'quickpay_cancel_transaction_on_cancel'              => [
    138                     'title'       => __( 'Cancel payments on order cancellation', 'woo-quickpay' ),
    139                     'type'        => 'checkbox',
    140                     'label'       => __( 'Enable', 'woo-quickpay' ),
    141                     'description' => __( 'Automatically cancel payments via the API when an order\'s status changes to cancelled.', 'woo-quickpay' ),
     138                    'title'       => esc_html__( 'Cancel payments on order cancellation', 'woocommerce-quickpay' ),
     139                    'type'        => 'checkbox',
     140                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     141                    'description' => esc_html__( 'Automatically cancel payments via the API when an order\'s status changes to cancelled.', 'woocommerce-quickpay' ),
    142142                    'default'     => 'no',
    143143                ],
    144144                'quickpay_text_on_statement'                         => [
    145                     'title'             => __( 'Text on statement', 'woo-quickpay' ),
     145                    'title'             => esc_html__( 'Text on statement', 'woocommerce-quickpay' ),
    146146                    'type'              => 'text',
    147                     'description'       => __( 'Text that will be placed on cardholder’s bank statement (MAX 22 ASCII characters. Must match the values defined in your agreement with Clearhaus. Custom values are not allowed).', 'woo-quickpay' ),
     147                    'description'       => esc_html__( 'Text that will be placed on cardholder’s bank statement (MAX 22 ASCII characters. Must match the values defined in your agreement with Clearhaus. Custom values are not allowed).', 'woocommerce-quickpay' ),
    148148                    'default'           => '',
    149149                    'desc_tip'          => false,
     
    156156                '_Shop_setup'                           => [
    157157                    'type'  => 'title',
    158                     'title' => __( 'Shop setup', 'woo-quickpay' ),
     158                    'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ),
    159159                ],
    160160                'title'                                 => [
    161                     'title'       => __( 'Title', 'woo-quickpay' ),
    162                     'type'        => 'text',
    163                     'description' => __( 'This controls the title which the user sees during checkout.', 'woo-quickpay' ),
    164                     'default'     => __( 'Quickpay', 'woo-quickpay' ),
     161                    'title'       => esc_html__( 'Title', 'woocommerce-quickpay' ),
     162                    'type'        => 'text',
     163                    'description' => esc_html__( 'This controls the title which the user sees during checkout.', 'woocommerce-quickpay' ),
     164                    'default'     => esc_html__( 'Quickpay', 'woocommerce-quickpay' ),
    165165                    'desc_tip'    => true,
    166166                ],
    167167                'description'                           => [
    168                     'title'       => __( 'Customer Message', 'woo-quickpay' ),
     168                    'title'       => esc_html__( 'Customer Message', 'woocommerce-quickpay' ),
    169169                    'type'        => 'textarea',
    170                     'description' => __( 'This controls the description which the user sees during checkout.', 'woo-quickpay' ),
    171                     'default'     => __( 'Pay via Quickpay. Allows you to pay with your credit card via Quickpay.', 'woo-quickpay' ),
     170                    'description' => esc_html__( 'This controls the description which the user sees during checkout.', 'woocommerce-quickpay' ),
     171                    'default'     => esc_html__( 'Pay via Quickpay. Allows you to pay with your credit card via Quickpay.', 'woocommerce-quickpay' ),
    172172                    'desc_tip'    => true,
    173173                ],
    174174                'checkout_button_text'                  => [
    175                     'title'       => __( 'Order button text', 'woo-quickpay' ),
    176                     'type'        => 'text',
    177                     'description' => __( 'Text shown on the submit button when choosing payment method.', 'woo-quickpay' ),
    178                     'default'     => __( 'Go to payment', 'woo-quickpay' ),
     175                    'title'       => esc_html__( 'Order button text', 'woocommerce-quickpay' ),
     176                    'type'        => 'text',
     177                    'description' => esc_html__( 'Text shown on the submit button when choosing payment method.', 'woocommerce-quickpay' ),
     178                    'default'     => esc_html__( 'Go to payment', 'woocommerce-quickpay' ),
    179179                    'desc_tip'    => true,
    180180                ],
    181181                'instructions'                          => [
    182                     'title'       => __( 'Email instructions', 'woo-quickpay' ),
     182                    'title'       => esc_html__( 'Email instructions', 'woocommerce-quickpay' ),
    183183                    'type'        => 'textarea',
    184                     'description' => __( 'Instructions that will be added to emails.', 'woo-quickpay' ),
     184                    'description' => esc_html__( 'Instructions that will be added to emails.', 'woocommerce-quickpay' ),
    185185                    'default'     => '',
    186186                    'desc_tip'    => true,
    187187                ],
    188188                'quickpay_icons'                        => [
    189                     'title'             => __( 'Credit card icons', 'woo-quickpay' ),
     189                    'title'             => esc_html__( 'Credit card icons', 'woocommerce-quickpay' ),
    190190                    'type'              => 'multiselect',
    191                     'description'       => __( 'Choose the card icons you wish to show next to the Quickpay payment option in your shop.', 'woo-quickpay' ),
     191                    'description'       => esc_html__( 'Choose the card icons you wish to show next to the Quickpay payment option in your shop.', 'woocommerce-quickpay' ),
    192192                    'desc_tip'          => true,
    193193                    'class'             => 'wc-enhanced-select',
    194194                    'css'               => 'width: 450px;',
    195195                    'custom_attributes' => [
    196                         'data-placeholder' => __( 'Select icons', 'woo-quickpay' )
     196                        'data-placeholder' => esc_html__( 'Select icons', 'woocommerce-quickpay' )
    197197                    ],
    198198                    'default'           => '',
     
    200200                ],
    201201                'quickpay_icons_maxheight'              => [
    202                     'title'       => __( 'Credit card icons maximum height', 'woo-quickpay' ),
     202                    'title'       => esc_html__( 'Credit card icons maximum height', 'woocommerce-quickpay' ),
    203203                    'type'        => 'number',
    204                     'description' => __( 'Set the maximum pixel height of the credit card icons shown on the frontend.', 'woo-quickpay' ),
     204                    'description' => esc_html__( 'Set the maximum pixel height of the credit card icons shown on the frontend.', 'woocommerce-quickpay' ),
    205205                    'default'     => 20,
    206206                    'desc_tip'    => true,
     
    208208                'Google Analytics'                      => [
    209209                    'type'  => 'title',
    210                     'title' => __( 'Google Analytics', 'woo-quickpay' ),
     210                    'title' => esc_html__( 'Google Analytics', 'woocommerce-quickpay' ),
    211211                ],
    212212                'quickpay_google_analytics_tracking_id' => [
    213                     'title'       => __( 'Tracking ID', 'woo-quickpay' ),
    214                     'type'        => 'text',
    215                     'description' => __( 'Your Google Analytics tracking ID. I.E: UA-XXXXXXXXX-X', 'woo-quickpay' ),
     213                    'title'       => esc_html__( 'Tracking ID', 'woocommerce-quickpay' ),
     214                    'type'        => 'text',
     215                    'description' => esc_html__( 'Your Google Analytics tracking ID. I.E: UA-XXXXXXXXX-X', 'woocommerce-quickpay' ),
    216216                    'default'     => '',
    217217                    'desc_tip'    => true,
     
    219219                'ShopAdminSetup'                        => [
    220220                    'type'  => 'title',
    221                     'title' => __( 'Shop Admin Setup', 'woo-quickpay' ),
     221                    'title' => esc_html__( 'Shop Admin Setup', 'woocommerce-quickpay' ),
    222222                ],
    223223
    224224                'quickpay_orders_transaction_info' => [
    225                     'title'       => __( 'Fetch Transaction Info', 'woo-quickpay' ),
    226                     'type'        => 'checkbox',
    227                     'label'       => __( 'Enable', 'woo-quickpay' ),
    228                     'description' => __( 'Show transaction information in the order overview.', 'woo-quickpay' ),
     225                    'title'       => esc_html__( 'Fetch Transaction Info', 'woocommerce-quickpay' ),
     226                    'type'        => 'checkbox',
     227                    'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     228                    'description' => esc_html__( 'Show transaction information in the order overview.', 'woocommerce-quickpay' ),
    229229                    'default'     => 'yes',
    230230                    'desc_tip'    => false,
     
    233233                'CustomVariables'           => [
    234234                    'type'  => 'title',
    235                     'title' => __( 'Custom Variables', 'woo-quickpay' ),
     235                    'title' => esc_html__( 'Custom Variables', 'woocommerce-quickpay' ),
    236236                ],
    237237                'quickpay_custom_variables' => [
    238                     'title'             => __( 'Select Information', 'woo-quickpay' ),
     238                    'title'             => esc_html__( 'Select Information', 'woocommerce-quickpay' ),
    239239                    'type'              => 'multiselect',
    240240                    'class'             => 'wc-enhanced-select',
    241241                    'css'               => 'width: 450px;',
    242242                    'default'           => '',
    243                     'description'       => __( 'Selected options will store the specific data on your transaction inside your Quickpay Manager.', 'woo-quickpay' ),
     243                    'description'       => esc_html__( 'Selected options will store the specific data on your transaction inside your Quickpay Manager.', 'woocommerce-quickpay' ),
    244244                    'options'           => self::custom_variable_options(),
    245245                    'desc_tip'          => true,
    246246                    'custom_attributes' => [
    247                         'data-placeholder' => __( 'Select order data', 'woo-quickpay' )
     247                        'data-placeholder' => esc_html__( 'Select order data', 'woocommerce-quickpay' )
    248248                    ]
    249249                ],
     
    257257
    258258            $fields['subscription_autocomplete_renewal_orders'] = [
    259                 'title'       => __( 'Complete renewal orders', 'woo-quickpay' ),
     259                'title'       => esc_html__( 'Complete renewal orders', 'woocommerce-quickpay' ),
    260260                'type'        => 'checkbox',
    261                 'label'       => __( 'Enable', 'woo-quickpay' ),
    262                 'description' => __( 'Automatically mark a renewal order as complete on successful recurring payments.', 'woo-quickpay' ),
     261                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     262                'description' => esc_html__( 'Automatically mark a renewal order as complete on successful recurring payments.', 'woocommerce-quickpay' ),
    263263                'default'     => 'no',
    264264                'desc_tip'    => true,
     
    267267            // Creates a subscription transaction on renewal orders and automatically captures payment for it afterwards on callback
    268268            $fields['subscription_update_card_on_manual_renewal_payment'] = [
    269                 'title'       => __( 'Update card on manual renewal payment', 'woo-quickpay' ),
     269                'title'       => esc_html__( 'Update card on manual renewal payment', 'woocommerce-quickpay' ),
    270270                'type'        => 'checkbox',
    271                 'label'       => __( 'Enable', 'woo-quickpay' ),
    272                 'description' => __( 'When paying failed renewals, the payment link will authorize a new subscription transaction which will be saved on the customer\'s subscription. On callback, a payment transaction related to the actual renewal order will be created.', 'woo-quickpay' ),
     271                'label'       => esc_html__( 'Enable', 'woocommerce-quickpay' ),
     272                'description' => esc_html__( 'When paying failed renewals, the payment link will authorize a new subscription transaction which will be saved on the customer\'s subscription. On callback, a payment transaction related to the actual renewal order will be created.', 'woocommerce-quickpay' ),
    273273                'default'     => 'no',
    274274                'desc_tip'    => true,
     
    298298        ], $statuses );
    299299
    300         $filtered_statuses = array_filter( $statuses, static fn( $status ) => in_array( $status, $allowed_status, true, ), ARRAY_FILTER_USE_KEY );
    301 
    302         return array_merge( [ null => __( '-- Select (optional) --', 'woo-quickpay' ) ], $filtered_statuses );
     300        $filtered_statuses = array_filter( $statuses, static fn( $status ) => in_array( $status, $allowed_status, true ), ARRAY_FILTER_USE_KEY );
     301
     302        return array_merge( [ null => esc_html__( '-- Select (optional) --', 'woocommerce-quickpay' ) ], $filtered_statuses );
    303303    }
    304304
     
    351351    private static function custom_variable_options() {
    352352        $options = [
    353             'billing_all_data'  => __( 'Billing: Complete Customer Details', 'woo-quickpay' ),
    354             'browser_useragent' => __( 'Browser: User Agent', 'woo-quickpay' ),
    355             'customer_email'    => __( 'Customer: Email Address', 'woo-quickpay' ),
    356             'customer_phone'    => __( 'Customer: Phone Number', 'woo-quickpay' ),
    357             'shipping_all_data' => __( 'Shipping: Complete Customer Details', 'woo-quickpay' ),
    358             'shipping_method'   => __( 'Shipping: Shipping Method', 'woo-quickpay' ),
     353            'billing_all_data'  => __( 'Billing: Complete Customer Details', 'woocommerce-quickpay' ),
     354            'browser_useragent' => __( 'Browser: User Agent', 'woocommerce-quickpay' ),
     355            'customer_email'    => __( 'Customer: Email Address', 'woocommerce-quickpay' ),
     356            'customer_phone'    => __( 'Customer: Phone Number', 'woocommerce-quickpay' ),
     357            'shipping_all_data' => __( 'Shipping: Complete Customer Details', 'woocommerce-quickpay' ),
     358            'shipping_method'   => __( 'Shipping: Shipping Method', 'woocommerce-quickpay' ),
    359359        ];
    360360
     
    370370     */
    371371    public static function clear_logs_section() {
    372         $html = sprintf( '<h3 class="wc-settings-sub-title">%s</h3>', __( 'Debug', 'woo-quickpay' ) );
    373         $html .= sprintf( '<a id="wcqp_wiki" class="wcqp-debug-button button button-primary" href="%s" target="_blank">%s</a>', self::get_wiki_link(), __( 'Got problems? Check out the Wiki.', 'woo-quickpay' ) );
    374         $html .= sprintf( '<a id="wcqp_logs" class="wcqp-debug-button button" href="%s">%s</a>', WC_QP()->log->get_admin_link(), __( 'View debug logs', 'woo-quickpay' ) );
     372        $html = sprintf( '<h3 class="wc-settings-sub-title">%s</h3>', esc_html__( 'Debug', 'woocommerce-quickpay' ) );
     373        $html .= sprintf( '<a id="wcqp_wiki" class="wcqp-debug-button button button-primary" href="%s" target="_blank">%s</a>', self::get_wiki_link(), esc_html__( 'Got problems? Check out the Wiki.', 'woocommerce-quickpay' ) );
     374        $html .= sprintf( '<a id="wcqp_logs" class="wcqp-debug-button button" href="%s">%s</a>', WC_QP()->log->get_admin_link(), esc_html__( 'View debug logs', 'woocommerce-quickpay' ) );
    375375
    376376        if ( woocommerce_quickpay_can_user_empty_logs() ) {
    377             $html .= sprintf( '<button role="button" id="wcqp_logs_clear" class="wcqp-debug-button button">%s</button>', __( 'Empty debug logs', 'woo-quickpay' ) );
     377            $html .= sprintf( '<button role="button" id="wcqp_logs_clear" class="wcqp-debug-button button">%s</button>', esc_html__( 'Empty debug logs', 'woocommerce-quickpay' ) );
    378378        }
    379379
    380380        if ( woocommerce_quickpay_can_user_flush_cache() ) {
    381             $html .= sprintf( '<button role="button" id="wcqp_flush_cache" class="wcqp-debug-button button">%s</button>', __( 'Empty transaction cache', 'woo-quickpay' ) );
     381            $html .= sprintf( '<button role="button" id="wcqp_flush_cache" class="wcqp-debug-button button">%s</button>', esc_html__( 'Empty transaction cache', 'woocommerce-quickpay' ) );
    382382        }
    383383
    384384        $html .= sprintf( '<br/>' );
    385         $html .= sprintf( '<h3 class="wc-settings-sub-title">%s</h3>', __( 'Enable', 'woo-quickpay' ) );
     385        $html .= sprintf( '<h3 class="wc-settings-sub-title">%s</h3>', esc_html__( 'Enable', 'woocommerce-quickpay' ) );
    386386
    387387        return $html;
     
    406406
    407407        $mandatory_fields = [
    408             'quickpay_privatekey' => __( 'Private key', 'woo-quickpay' ),
    409             'quickpay_apikey'     => __( 'Api User key', 'woo-quickpay' )
     408            'quickpay_privatekey' => __( 'Private key', 'woocommerce-quickpay' ),
     409            'quickpay_apikey'     => __( 'Api User key', 'woocommerce-quickpay' )
    410410        ];
    411411
     
    417417
    418418        if ( ! empty( $error_fields ) ) {
    419             $message = sprintf( '<h2>%s</h2>', __( "Quickpay for WooCommerce", 'woo-quickpay' ) );
    420             $message .= sprintf( '<p>%s</p>', sprintf( __( 'You have missing or incorrect settings. Go to the <a href="%s">settings page</a>.', 'woo-quickpay' ), self::get_settings_page_url() ) );
     419            $message = sprintf( '<h2>%s</h2>', esc_html__( "Quickpay for WooCommerce", 'woocommerce-quickpay' ) );
     420            /* translators: 1: Link to the settings page */
     421            $message .= sprintf( '<p>%s</p>', sprintf( __( 'You have missing or incorrect settings. Go to the <a href="%s">settings page</a>.', 'woocommerce-quickpay' ), esc_url( self::get_settings_page_url() ) ) );
    421422            $message .= '<ul>';
    422423            foreach ( $error_fields as $error_field ) {
    423                 $message .= "<li>" . sprintf( __( '<strong>%s</strong> is mandatory.', 'woo-quickpay' ), $error_field ) . "</li>";
     424                $message .= "<li>" . sprintf( wp_kses( '<strong>%s</strong> is mandatory.', 'woocommerce-quickpay', [ 'strong' ] ), esc_html( $error_field ) ) . "</li>";
    424425            }
    425426            $message .= '</ul>';
    426427
    427             printf( '<div class="%s">%s</div>', 'notice notice-error', $message );
     428            echo wp_kses_post( sprintf( '<div class="%s">%s</div>', 'notice notice-error', $message ) );
    428429        }
    429430
     
    447448
    448449        return empty( $_POST[ $post_key ] ) && empty( $setting_key );
    449 
    450450    }
    451451
  • woocommerce-quickpay/trunk/helpers/notices.php

    r3095043 r3395304  
    110110            array_walk( $notices, 'esc_html' );
    111111            echo '<div class="wcqp-notice notice notice-error is-dismissible">';
    112             printf( '<h3>%s</h3>', __( 'Quickpay - Payment related problems registered' ) );
     112            printf( '<h3>%s</h3>', esc_html__( 'Quickpay - Payment related problems registered', 'woocommerce-quickpay') );
    113113            echo '<p>' . wp_kses_post( implode( "</p>\n<p>", $notices ) ) . '</p>';
    114114            echo '</div>';
  • woocommerce-quickpay/trunk/helpers/requests.php

    r2924617 r3395304  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     3
    24/**
    35 * Ensure that payments.quickpay.net is a trusted redirect host
  • woocommerce-quickpay/trunk/helpers/transactions.php

    r3250888 r3395304  
    6767
    6868    if ( ! $order->needs_payment() && ! WC_QuickPay_Requests_Utils::is_request_to_change_payment() ) {
    69         throw new Exception( __( 'Order does not need payment', 'woo-quickpay' ) );
     69        throw new Exception( esc_html__( 'Order does not need payment', 'woocommerce-quickpay' ) );
    7070    }
    7171
  • woocommerce-quickpay/trunk/templates/admin/meta-box-order.php

    r2924617 r3395304  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) {
     3    exit;
     4} // Exit if accessed directly
     5
    26/**
    37 * @var WC_QuickPay_API_Transaction $transaction
     
    913 * @var string $transaction_brand
    1014 */
     15
    1116?>
    1217<?php if ( isset( $transaction ) ) : ?>
    13     <p class="woocommerce-quickpay-<?php echo esc_attr( $transaction_status ) ?>">
    14         <strong><?php _e( 'Current payment state', 'woo-quickpay' ) ?>: <?php echo $transaction_status ?></strong>
    15     </p>
     18    <p class="woocommerce-quickpay-<?php echo esc_attr( $transaction_status ) ?>">
     19        <strong><?php esc_html_e( 'Current payment state', 'woocommerce-quickpay' ) ?>: <?php echo esc_html( $transaction_status ) ?></strong>
     20    </p>
    1621
    17     <?php if ( $transaction->is_action_allowed( 'standard_actions' ) ) : ?>
    18         <h4><strong><?php _e( 'Actions', 'woo-quickpay' ) ?></strong></h4>
    19         <ul class="order_action">
    20             <?php if ( $transaction->is_action_allowed( 'capture' ) ) : ?>
    21                 <li class="qp-full-width">
    22                     <a class="button button-primary" data-action="capture" data-confirm="<?php echo esc_attr( __( 'You are about to capture this payment', 'woo-quickpay' ) ) ?>">
    23                         <?php printf( __( 'Capture Full Amount (%s)', 'woo-quickpay' ), wc_price( $transaction->get_remaining_balance_as_float(), [ 'currency' => $transaction->get_currency() ] ) ) ?>
    24                     </a>
    25                 </li>
    26             <?php endif ?>
     22    <?php if ( $transaction->is_action_allowed( 'standard_actions' ) ) : ?>
     23        <h4><strong><?php esc_html_e( 'Actions', 'woocommerce-quickpay' ) ?></strong></h4>
     24        <ul class="order_action">
     25            <?php if ( $transaction->is_action_allowed( 'capture' ) ) : ?>
     26                <li class="qp-full-width">
     27                    <a class="button button-primary" data-action="capture"
     28                       data-confirm="<?php echo esc_attr( __( 'You are about to capture this payment', 'woocommerce-quickpay' ) ) ?>">
     29                        <?php /* translators: %s: remaining balance */ ?>
     30                        <?php echo wp_kses_post( sprintf( __( 'Capture Full Amount (%s)', 'woocommerce-quickpay' ), wc_price( $transaction->get_remaining_balance_as_float(), [ 'currency' => $transaction->get_currency() ] ) ) ) ?>
     31                    </a>
     32                </li>
     33            <?php endif ?>
    2734
    28             <li class="qp-balance">
    29                 <span class="qp-balance__label"><?php _e( 'Remaining balance', 'woo-quickpay' ) ?>:</span>
    30                 <span class="qp-balance__amount">
     35            <li class="qp-balance">
     36                <span class="qp-balance__label"><?php esc_html_e( 'Remaining balance', 'woocommerce-quickpay' ) ?>:</span>
     37                <span class="qp-balance__amount">
    3138                <span class='qp-balance__currency'>
    32                 <?php echo $transaction->get_currency() ?>
     39                <?php echo esc_html( $transaction->get_currency() ) ?>
    3340                </span>
    34                 <?php echo $transaction->get_formatted_remaining_balance() ?></span>
    35             </li>
     41                <?php echo esc_html( $transaction->get_formatted_remaining_balance() ) ?></span>
     42            </li>
    3643
    37             <?php if ( $transaction->is_action_allowed( 'capture' ) ) : ?>
    38                 <li class="qp-balance last">
     44            <?php if ( $transaction->is_action_allowed( 'capture' ) ) : ?>
     45                <li class="qp-balance last">
    3946                <span class="qp-balance__label">
    40                     <?php _e( 'Capture amount', 'woo-quickpay' ) ?>:
     47                    <?php esc_html_e( 'Capture amount', 'woocommerce-quickpay' ) ?>:
    4148                </span>
    42                     <span class="qp-balance__amount">
    43                     <span class='qp-balance__currency'><?php echo $transaction->get_currency() ?></span>
     49                    <span class="qp-balance__amount">
     50                    <span class='qp-balance__currency'><?php echo esc_html( $transaction->get_currency() ) ?></span>
    4451                    <input id='qp-balance__amount-field' type='text' value='<?php echo esc_attr( $transaction->get_formatted_remaining_balance() ) ?> '/>
    4552                </span>
    46                 </li>
     53                </li>
    4754
    48                 <li class="qp-full-width">
    49                     <a class="button" data-action="captureAmount" data-confirm="<?php esc_attr__( 'You are about to capture this payment', 'woo-quickpay' ) ?>">
    50                         <?php _e( 'Capture Specified Amount', 'woo-quickpay' ) ?>
    51                     </a>
    52                 </li>
    53             <?php endif ?>
     55                <li class="qp-full-width">
     56                    <a class="button" data-action="captureAmount" data-confirm="<?php esc_attr__( 'You are about to capture this payment', 'woocommerce-quickpay' ) ?>">
     57                        <?php esc_html_e( 'Capture Specified Amount', 'woocommerce-quickpay' ) ?>
     58                    </a>
     59                </li>
     60            <?php endif ?>
    5461
    55             <?php if ( $transaction->is_action_allowed( 'cancel' ) ) : ?>
    56                 <li class="qp-full-width">
    57                     <a class="button" data-action="cancel" data-confirm="<?php esc_attr__( 'You are about to cancel this payment', 'woo-quickpay' ) ?>">
    58                         <?php _e( 'Cancel', 'woo-quickpay' ) ?>
    59                     </a>
    60                 </li>
    61             <?php endif ?>
    62         </ul>
    63     <?php endif ?>
    64     <p>
    65         <small>
    66             <strong><?php echo __( 'Transaction ID', 'woo-quickpay' ) ?>:</strong> <?php echo $transaction_id ?>
    67             <?php if ( $brand_image_url = WC_Quickpay_Helper::get_payment_type_logo( $transaction_brand ) ) : ?>
    68                 <span class="qp-meta-card">
     62            <?php if ( $transaction->is_action_allowed( 'cancel' ) ) : ?>
     63                <li class="qp-full-width">
     64                    <a class="button" data-action="cancel" data-confirm="<?php esc_attr__( 'You are about to cancel this payment', 'woocommerce-quickpay' ) ?>">
     65                        <?php esc_html_e( 'Cancel', 'woocommerce-quickpay' ) ?>
     66                    </a>
     67                </li>
     68            <?php endif ?>
     69        </ul>
     70    <?php endif ?>
     71    <p>
     72        <small>
     73            <strong><?php echo esc_html__( 'Transaction ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html( $transaction_id ) ?>
     74            <?php if ( $brand_image_url = WC_Quickpay_Helper::get_payment_type_logo( $transaction_brand ) ) : ?>
     75                <span class="qp-meta-card">
    6976                <img src="<?php echo esc_attr( $brand_image_url ) ?>" alt="<?php echo esc_attr( $transaction_brand ) ?>"/>
    7077            </span>
    71             <?php endif ?>
    72         </small>
    73     </p>
     78            <?php endif ?>
     79        </small>
     80    </p>
    7481<?php endif ?>
    7582
    7683<?php if ( ! empty( $transaction_order_id ) ) : ?>
    77     <p>
    78         <small>
    79             <strong><?php _e( 'Transaction Order ID', 'woo-quickpay' ) ?>:</strong> <?php echo $transaction_order_id ?>
    80         </small>
    81     </p>
     84    <p>
     85        <small>
     86            <strong><?php esc_html_e( 'Transaction Order ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html( $transaction_order_id ) ?>
     87        </small>
     88    </p>
    8289<?php endif ?>
    8390
    8491<?php if ( ! empty( $payment_id ) ) : ?>
    85     <p>
    86         <small>
    87             <strong><?php _e( 'Payment ID', 'woo-quickpay' ) ?>:</strong> <?php echo $payment_id ?>
    88         </small>
    89     </p>
     92    <p>
     93        <small>
     94            <strong><?php esc_html_e( 'Payment ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html( $payment_id ) ?>
     95        </small>
     96    </p>
    9097<?php endif ?>
    9198
    9299<?php if ( ! empty( $payment_link ) ) : ?>
    93     <p>
    94         <small>
    95             <strong><?php _e( 'Payment Link', 'woo-quickpay' ) ?>:</strong> <br/>
    96             <input type="text" style="width: 100%;" value="<?php echo esc_attr( $payment_link ) ?>" readonly/>
    97         </small>
    98     </p>
     100    <p>
     101        <small>
     102            <strong><?php esc_html_e( 'Payment Link', 'woocommerce-quickpay' ) ?>:</strong> <br/>
     103            <input type="text" style="width: 100%;" value="<?php echo esc_attr( $payment_link ) ?>" readonly/>
     104        </small>
     105    </p>
    99106<?php endif ?>
  • woocommerce-quickpay/trunk/templates/admin/meta-box-subscription.php

    r2924617 r3395304  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     3
    24/**
    35 * @var string $transaction_status
     
    911    <p class="woocommerce-quickpay-<?php echo esc_attr( $transaction_status ) ?>">
    1012        <strong>
    11             <?php _e( 'Current payment state', 'woo-quickpay' ) ?>: <?php echo $transaction_status ?>
     13            <?php esc_html_e( 'Current payment state', 'woocommerce-quickpay' ) ?>: <?php echo esc_html($transaction_status) ?>
    1214        </strong>
    1315    </p>
     
    1719    <p>
    1820        <small>
    19             <strong><?php _e( 'Transaction ID', 'woo-quickpay' ) ?>:</strong> <?php echo $transaction_id ?>
     21            <strong><?php esc_html_e( 'Transaction ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html($transaction_id) ?>
    2022            <span class="qp-meta-card">
    2123                <img src="<?php echo esc_attr( WC_Quickpay_Helper::get_payment_type_logo( $transaction_brand ) ) ?>"
     
    2931    <p>
    3032        <small>
    31             <strong><?php _e( 'Transaction Order ID', 'woo-quickpay' ) ?>:</strong> <?php echo $transaction_order_id ?>
     33            <strong><?php esc_html_e( 'Transaction Order ID', 'woocommerce-quickpay' ) ?>:</strong> <?php echo esc_html($transaction_order_id) ?>
    3234        </small>
    3335    </p>
  • woocommerce-quickpay/trunk/templates/woocommerce/emails/customer-quickpay-payment-link.php

    r2100188 r3395304  
    2525
    2626<?php /* translators: %s: Customer first name */ ?>
    27     <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
     27    <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce-quickpay' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
    2828
    29     <p><?php echo esc_html__( 'Thank you for your order.', 'woo-quickpay' ) . "\n\n"; ?></p>
     29    <p><?php echo esc_html__( 'Thank you for your order.', 'woocommerce-quickpay' ) . "\n\n"; ?></p>
    3030
    3131<?php /* translators: %s: Site title */ ?>
    32     <p><?php printf( esc_html__( 'Use the following link to pay and complete your order: %s', 'woo-quickpay' ), make_clickable( $payment_link ) ); ?></p>
     32    <p><?php printf( esc_html__( 'Use the following link to pay and complete your order: %s', 'woocommerce-quickpay' ), make_clickable( $payment_link ) ); ?></p>
    3333<?php
    3434
     
    5454?>
    5555    <p>
    56         <?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce' ); ?>
     56        <?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce-quickpay' ); ?>
    5757    </p>
    5858<?php
  • woocommerce-quickpay/trunk/templates/woocommerce/emails/plain/customer-quickpay-payment-link.php

    r2100188 r3395304  
    2323
    2424/* translators: %s: Customer first name */
    25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
     25echo sprintf( esc_html__( 'Hi %s,', 'woocommerce-quickpay' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
    2626
    27 echo esc_html__( 'Thank you for your order.', 'woo-quickpay' ) . "\n\n";
     27echo esc_html__( 'Thank you for your order.', 'woocommerce-quickpay' ) . "\n\n";
    2828
    29 echo sprintf(esc_html__( 'Use the following link to pay and complete your order: %s', 'woo-quickpay' ). $payment_link) . "\n\n";
     29/* translators: 1: The payment link */
     30echo esc_html(sprintf(__( 'Use the following link to pay and complete your order: %s', 'woocommerce-quickpay' ). $payment_link)). "\n\n";
    3031
    3132echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
     
    5253do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
    5354
    54 echo esc_html__( 'Thanks for shopping with us.', 'woocommerce' ) . "\n\n";
     55echo esc_html__( 'Thanks for shopping with us.', 'woocommerce-quickpay' ) . "\n\n";
    5556
    5657echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
  • woocommerce-quickpay/trunk/views/html-notice-update.php

    r3394934 r3395304  
    1010?>
    1111<div id="woocommerce-upgrade-notice" class="updated woocommerce-message wc-connect">
    12     <h3><strong><?php _e( 'Quickpay for WooCommerce - Data Update', 'woo-quickpay' ); ?></strong></h3>
    13     <p><?php _e( 'To ensure you get the best experience at all times, we need to update your store\'s database to the latest version.', 'woo-quickpay' ); ?></p>
    14     <p class="submit"><a href="#" class="woocommerce-quickpay-update-now button-primary"><?php _e( 'Run the updater', 'woo-quickpay' ); ?></a></p>
     12    <h3><strong><?php esc_html_e( 'Quickpay for WooCommerce - Data Update', 'woocommerce-quickpay' ); ?></strong></h3>
     13    <p><?php esc_html_e( 'To ensure you get the best experience at all times, we need to update your store\'s database to the latest version.', 'woocommerce-quickpay' ); ?></p>
     14    <p class="submit"><a href="#" class="woocommerce-quickpay-update-now button-primary"><?php esc_html_e( 'Run the updater', 'woocommerce-quickpay' ); ?></a></p>
    1515</div>
    1616<script type="text/javascript">
    1717    (function ($) {
    18         $( '.woocommerce-quickpay-update-now' ).click( 'click', function() {
    19             var confirm = window.confirm( '<?php echo esc_js( __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'woo-quickpay' ) ); ?>' ); // jshint ignore:line
     18        $('.woocommerce-quickpay-update-now').click('click', function () {
     19            var confirm = window.confirm('<?php echo esc_js( __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'woocommerce-quickpay' ) ); ?>'); // jshint ignore:line
    2020
    2121            if (confirm) {
     
    2424                message.find('p').fadeOut();
    2525
    26                 $.post('<?php echo admin_url('admin-ajax.php'); ?>', {
     26                $.post('<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>', {
    2727                    action: 'quickpay_run_data_upgrader',
    28                     nonce: '<?php echo WC_QuickPay_Install::create_run_upgrader_nonce(); ?>'
     28                    nonce: '<?php echo esc_attr( WC_QuickPay_Install::create_run_upgrader_nonce() ); ?>'
    2929                }, function () {
    30                     message.append($('<p></p>').text("<?php _e('The upgrader is now running. This might take a while. The notice will disappear once the upgrade is complete.', 'woo-quickpay'); ?>"));
     30                    message.append($('<p></p>').text("<?php esc_html_e( 'The upgrader is now running. This might take a while. The notice will disappear once the upgrade is complete.', 'woocommerce-quickpay' ); ?>"));
    3131                });
    3232            }
  • woocommerce-quickpay/trunk/views/html-notice-upgrading.php

    r3394934 r3395304  
    1010?>
    1111<div id="woocommerce-upgrade-notice" class="updated woocommerce-message wc-connect">
    12     <h3><strong><?php _e( 'Quickpay for WooCommerce - Data Update', 'woo-quickpay' ); ?></strong></h3>
    13     <p><?php _e('The upgrader is now running. This might take a while. The notice will disappear once the upgrade is complete.', 'woo-quickpay'); ?></p>
    14 
     12    <h3><strong><?php esc_html_e( 'Quickpay for WooCommerce - Data Update', 'woocommerce-quickpay' ); ?></strong></h3>
     13    <p><?php esc_html_e('The upgrader is now running. This might take a while. The notice will disappear once the upgrade is complete.', 'woocommerce-quickpay'); ?></p>
    1514</div>
  • woocommerce-quickpay/trunk/views/html-order-table-transaction-data.php

    r2100188 r3395304  
     1<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
     2
    13<div class="woocommerce-quickpay-order-transaction-data">
    24    <table border="0" cellpadding="0" cellspacing="0" class="meta">
    35        <tr>
    4             <td><?php _e('ID', 'woo-quickpay' ) ?>:</td>
    5             <td>#<?php echo $transaction_id ?></td>
     6            <td><?php esc_html_e('ID', 'woocommerce-quickpay' ) ?>:</td>
     7            <td>#<?php echo esc_html($transaction_id) ?></td>
    68        </tr>
    79        <tr>
    8             <td><?php _e('Order ID', 'woo-quickpay' ) ?>:</td>
    9             <td><?php echo $transaction_order_id ?></td>
     10            <td><?php esc_html_e('Order ID', 'woocommerce-quickpay' ) ?>:</td>
     11            <td><?php echo esc_html($transaction_order_id) ?></td>
    1012        </tr>
    1113        <tr>
    12             <td><?php _e('Method', 'woo-quickpay' ) ?>:</td>
     14            <td><?php esc_html_e('Method', 'woocommerce-quickpay' ) ?>:</td>
    1315            <td>
    14                 <span class="transaction-brand"><img src="<?php echo $transaction_brand_logo_url ?>" alt="<?php echo $transaction_brand ?>" title="<?php echo $transaction_brand ?>" /></span>
     16                <span class="transaction-brand"><img src="<?php echo esc_attr($transaction_brand_logo_url) ?>" alt="<?php echo esc_attr($transaction_brand) ?>" title="<?php echo esc_attr($transaction_brand) ?>" /></span>
    1517            </td>
    1618        </tr>
     
    1820    <div class="tags">
    1921        <?php if ( $transaction_is_test ) : ?>
    20             <?php $tip_transaction_test = esc_attr( __( 'This order has been paid with test card data!', 'woo-quickpay' ) ) ?>
    21             <span class="tag is-test tips" data-tip="<?php echo $tip_transaction_test ?>"><?php _e( 'Test', 'woo-quickpay' ) ?></span>
     22            <?php $tip_transaction_test = esc_attr( __( 'This order has been paid with test card data!', 'woocommerce-quickpay' ) ) ?>
     23            <span class="tag is-test tips" data-tip="<?php echo esc_attr($tip_transaction_test) ?>"><?php esc_html_e( 'Test', 'woocommerce-quickpay' ) ?></span>
    2224        <?php endif; ?>
    23         <span class="tag is-<?php echo $transaction_status ?>">
    24             <?php echo $transaction_status ?>
     25        <span class="tag is-<?php echo esc_attr($transaction_status) ?>">
     26            <?php echo esc_html($transaction_status) ?>
    2527        </span>
    2628        <?php if ( $is_cached ) : ?>
    27             <?php $tip_transaction_cached = esc_attr( __( 'NB: The transaction data is served from cached results. Click to view the order and update the cached data.', 'woo-quickpay' ) )?>
    28             <span class="tag tips" data-tip="<?php echo $tip_transaction_cached ?>"><?php _e( 'Cached', 'woo-quickpay' ) ?></span>
     29            <?php $tip_transaction_cached = esc_attr( __( 'NB: The transaction data is served from cached results. Click to view the order and update the cached data.', 'woocommerce-quickpay' ) )?>
     30            <span class="tag tips" data-tip="<?php echo esc_attr($tip_transaction_cached) ?>"><?php esc_html_e( 'Cached', 'woocommerce-quickpay' ) ?></span>
    2931        <?php endif; ?>
    3032
  • woocommerce-quickpay/trunk/woocommerce-quickpay.php

    r3394934 r3395304  
    44 * Plugin URI: http://wordpress.org/plugins/woocommerce-quickpay/
    55 * Description: Integrates your Quickpay payment gateway into your WooCommerce installation.
    6  * Version: 7.4.0
     6 * Version: 7.5.0
    77 * Author: Perfect Solution
    8  * Text Domain: woo-quickpay
     8 * Text Domain: woocommerce-quickpay
    99 * Domain Path: /languages/
    1010 * Author URI: http://perfect-solution.dk
    1111 * Wiki: http://quickpay.perfect-solution.dk/
    1212 * WC requires at least: 7.1.0
    13  * WC tested up to: 8.9
     13 * WC tested up to: 10.5
     14 * License: GPLv2
     15 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1416 * Requires Plugins: woocommerce
    1517 */
     
    2022}
    2123
    22 define( 'WCQP_VERSION', '7.4.0' );
     24define( 'WCQP_VERSION', '7.5.0' );
    2325define( 'WCQP_URL', plugins_url( __FILE__ ) );
    2426define( 'WCQP_PATH', plugin_dir_path( __FILE__ ) );
     
    3133function wc_quickpay_woocommerce_inactive_notice() {
    3234    $class    = 'notice notice-error';
    33     $headline = __( 'Quickpay for WooCommerce requires WooCommerce to be active.', 'woo-quickpay' );
    34     $message  = __( 'Go to the plugins page to activate WooCommerce', 'woo-quickpay' );
    35     printf( '<div class="%1$s"><h2>%2$s</h2><p>%3$s</p></div>', $class, $headline, $message );
     35    $headline = __( 'Quickpay for WooCommerce requires WooCommerce to be active.', 'woocommerce-quickpay' );
     36    $message  = __( 'Go to the plugins page to activate WooCommerce', 'woocommerce-quickpay' );
     37    printf( '<div class="%1$s"><h2>%2$s</h2><p>%3$s</p></div>', esc_attr( $class ), esc_html( $headline ), esc_html( $message ) );
    3638}
    3739
     
    333335        public static function add_action_links( $links ) {
    334336            $links = array_merge( [
    335                 '<a href="' . WC_QuickPay_Settings::get_settings_page_url() . '">' . __( 'Settings', 'woo-quickpay' ) . '</a>',
     337                '<a href="' . WC_QuickPay_Settings::get_settings_page_url() . '">' . __( 'Settings', 'woocommerce-quickpay' ) . '</a>',
    336338            ], $links );
    337339
     
    404406        public function payment_fields(): void {
    405407            if ( $description = $this->get_description() ) {
    406                 echo wpautop( wptexturize( $description ) );
     408                echo wp_kses_post( wpautop( wptexturize( $description ) ) );
    407409            }
    408410        }
     
    527529                // Check if there is a transaction ID
    528530                if ( ! $transaction_id ) {
    529                     throw new QuickPay_Exception( sprintf( __( "No transaction ID for order: %s", 'woo-quickpay' ), $order_id ) );
     531                    /* translators: 1: the order id */
     532                    throw new QuickPay_Exception( sprintf( __( "No transaction ID for order: %s", 'woocommerce-quickpay' ), $order_id ) );
    530533                }
    531534
     
    537540                if ( ! $payment->is_action_allowed( 'refund' ) ) {
    538541                    if ( in_array( $payment->get_current_type(), [ 'authorize', 'recurring' ], true ) ) {
    539                         throw new QuickPay_Exception( __( 'A non-captured payment cannot be refunded.', 'woo-quickpay' ) );
     542                        throw new QuickPay_Exception( __( 'A non-captured payment cannot be refunded.', 'woocommerce-quickpay' ) );
    540543                    }
    541544
    542                     throw new QuickPay_Exception( __( 'Transaction state does not allow refunds.', 'woo-quickpay' ) );
     545                    throw new QuickPay_Exception( __( 'Transaction state does not allow refunds.', 'woocommerce-quickpay' ) );
    543546                }
    544547
     
    665668                    '_quickpay_transaction_id' => [
    666669                        'value' => WC_QuickPay_Order_Utils::get_transaction_id( $subscription ),
    667                         'label' => __( 'QuickPay Transaction ID', 'woo-quickpay' ),
     670                        'label' => __( 'QuickPay Transaction ID', 'woocommerce-quickpay' ),
    668671                    ],
    669672                ],
     
    693696
    694697                    // If transaction could be found, add a note on the order for history and debugging reasons.
    695                     $subscription->add_order_note( sprintf( __( 'QuickPay Transaction ID updated from #%d to #%d', 'woo-quickpay' ), $sub_transaction_id, $transaction_id ), 0, true );
     698                    /* translators: 1: old transaction ID, 2: new transaction ID */
     699                    $subscription->add_order_note( sprintf( esc_html__( 'QuickPay Transaction ID updated from #%1$d to #%2$d', 'woocommerce-quickpay' ), $sub_transaction_id, $transaction_id ), 0, true );
    696700                }
    697701            }
     
    750754            // Redirect the customer to account page if the current order is failed
    751755            if ( $order->get_status() === 'failed' ) {
    752                 $payment_failure_text = sprintf( __( '<p><strong>Payment failure</strong> A problem with your payment on order <strong>#%i</strong> occured. Please try again to complete your order.</p>', 'woo-quickpay' ), $order_id );
     756                $payment_failure_text = sprintf(
     757                    '<p><strong>%1$s</strong> %2$s %3$s</p>',
     758                    esc_html__( 'Payment failure', 'woocommerce-quickpay' ),
     759                        /* translators: 1: order number */
     760                        esc_html( sprintf( __( 'A problem with your payment on order %d occurred.', 'woocommerce-quickpay' ), absint( $order_id ) ) ),
     761                        esc_html__( 'Please try again to complete your order.', 'woocommerce-quickpay' )
     762                    );
    753763
    754764                wc_add_notice( $payment_failure_text, 'error' );
    755765
    756                 wp_redirect( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) );
    757             }
    758 
    759             $order->add_order_note( __( 'QuickPay Payment', 'woo-quickpay' ) . ': ' . __( 'Cancelled during process', 'woo-quickpay' ) );
    760 
    761             wc_add_notice( __( '<p><strong>%s</strong>: %s</p>', __( 'Payment cancelled', 'woo-quickpay' ), __( 'Due to cancellation of your payment, the order process was not completed. Please fulfill the payment to complete your order.', 'woo-quickpay' ) ), 'error' );
     766                wp_safe_redirect( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) );
     767            }
     768
     769            $order->add_order_note( esc_html__( 'QuickPay Payment', 'woocommerce-quickpay' ) . ': ' . esc_html__( 'Cancelled during process', 'woocommerce-quickpay' ) );
     770
     771            wc_add_notice( sprintf( '<p><strong>%s</strong>: %s</p>', esc_html__( 'Payment cancelled', 'woocommerce-quickpay' ), esc_html__( 'Due to cancellation of your payment, the order process was not completed. Please fulfill the payment to complete your order.', 'woocommerce-quickpay' ) ), 'error' );
    762772        }
    763773
     
    824834
    825835                                case 'refund' :
    826                                     $order->add_order_note( sprintf( 'Quickpay: ' . __( 'Refunded %s %s', 'woo-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) );
     836                                    /* translators: 1: price, 2: currency code */
     837                                    $order->add_order_note( sprintf( 'Quickpay: ' . __( 'Refunded %1$s %2$s', 'woocommerce-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) );
    827838                                    break;
    828839
     
    871882                    }
    872883                } else {
    873                     $this->log->add( sprintf( __( 'Invalid callback body for order #%s.', 'woo-quickpay' ), $order_number ) );
     884                    /* translators: 1: the order id */
     885                    $this->log->add( sprintf( __( 'Invalid callback body for order #%s.', 'woocommerce-quickpay' ), $order_number ) );
    874886                }
    875887            } catch ( JsonException $e ) {
     
    910922        public function generate_settings_html( $form_fields = array(), $echo = true ) {
    911923            $html = sprintf( "<p><small>Version: %s</small>", WCQP_VERSION );
    912             $html .= "<p>" . sprintf( __( 'Allows you to receive payments via %s', 'woo-quickpay' ), $this->get_method_title() ) . "</p>";
     924            /* translators: 1: payment method title */
     925            $html .= "<p>" . sprintf( __( 'Allows you to receive payments via %s', 'woocommerce-quickpay' ), $this->get_method_title() ) . "</p>";
    913926            $html .= WC_QuickPay_Settings::clear_logs_section();
    914927
     
    924937
    925938            if ( $echo ) {
    926                 echo $html; // WPCS: XSS ok.
     939                echo wp_kses_post( $html ); // WPCS: XSS ok.
    927940            } else {
    928941                return $html;
     
    947960
    948961            if ( $this->instructions ) {
    949                 echo wpautop( wptexturize( $this->instructions ) );
     962                echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) );
    950963            }
    951964        }
Note: See TracChangeset for help on using the changeset viewer.