Changeset 3395304
- Timestamp:
- 11/13/2025 07:51:10 PM (7 weeks ago)
- Location:
- woocommerce-quickpay
- Files:
-
- 4 added
- 4 deleted
- 106 edited
- 1 copied
-
tags/7.5.0 (copied) (copied from woocommerce-quickpay/trunk)
-
tags/7.5.0/README.txt (modified) (2 diffs)
-
tags/7.5.0/assets/javascript/backend.js (modified) (5 diffs)
-
tags/7.5.0/classes/api/woocommerce-quickpay-api-payment.php (modified) (4 diffs)
-
tags/7.5.0/classes/api/woocommerce-quickpay-api-subscription.php (modified) (2 diffs)
-
tags/7.5.0/classes/api/woocommerce-quickpay-api-transaction.php (modified) (2 diffs)
-
tags/7.5.0/classes/api/woocommerce-quickpay-api.php (modified) (1 diff)
-
tags/7.5.0/classes/emails/woocommerce-quickpay-payment-link-email.php (modified) (4 diffs)
-
tags/7.5.0/classes/instances/anyday.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/apple-pay.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/fbg1886.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/google-pay.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/ideal.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/instance.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/klarna.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/mobilepay-subscriptions.php (modified) (8 diffs)
-
tags/7.5.0/classes/instances/mobilepay.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/paypal.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/quickpay-extra.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/resurs.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/sofort.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/swish.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/trustly.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/viabill.php (modified) (1 diff)
-
tags/7.5.0/classes/instances/vipps.php (modified) (1 diff)
-
tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-action.php (modified) (1 diff)
-
tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-manage-payment.php (modified) (3 diffs)
-
tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-ping.php (modified) (1 diff)
-
tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-private-key.php (modified) (1 diff)
-
tags/7.5.0/classes/modules/woocommerce-quickpay-admin-orders-lists-table.php (modified) (7 diffs)
-
tags/7.5.0/classes/modules/woocommerce-quickpay-admin-orders-meta.php (modified) (2 diffs)
-
tags/7.5.0/classes/modules/woocommerce-quickpay-admin-orders.php (modified) (6 diffs)
-
tags/7.5.0/classes/modules/woocommerce-quickpay-orders.php (modified) (2 diffs)
-
tags/7.5.0/classes/modules/woocommerce-quickpay-subscriptions-change-payment-method.php (modified) (1 diff)
-
tags/7.5.0/classes/updates/woocommerce-quickpay-update-4.6.php (modified) (1 diff)
-
tags/7.5.0/classes/utils/woocommerce-quickpay-order-payments-utils.php (modified) (1 diff)
-
tags/7.5.0/classes/utils/woocommerce-quickpay-order-transaction-data-utils.php (modified) (1 diff)
-
tags/7.5.0/classes/woocommerce-quickpay-callbacks.php (modified) (7 diffs)
-
tags/7.5.0/classes/woocommerce-quickpay-exceptions.php (modified) (1 diff)
-
tags/7.5.0/classes/woocommerce-quickpay-helper.php (modified) (5 diffs)
-
tags/7.5.0/classes/woocommerce-quickpay-install.php (modified) (2 diffs)
-
tags/7.5.0/classes/woocommerce-quickpay-log.php (modified) (2 diffs)
-
tags/7.5.0/classes/woocommerce-quickpay-settings.php (modified) (18 diffs)
-
tags/7.5.0/helpers/notices.php (modified) (1 diff)
-
tags/7.5.0/helpers/requests.php (modified) (1 diff)
-
tags/7.5.0/helpers/transactions.php (modified) (1 diff)
-
tags/7.5.0/languages/woo-quickpay-da_DK.po (deleted)
-
tags/7.5.0/languages/woo-quickpay.pot (deleted)
-
tags/7.5.0/languages/woocommerce-quickpay-da_DK.po (added)
-
tags/7.5.0/languages/woocommerce-quickpay.pot (added)
-
tags/7.5.0/templates/admin/meta-box-order.php (modified) (2 diffs)
-
tags/7.5.0/templates/admin/meta-box-subscription.php (modified) (4 diffs)
-
tags/7.5.0/templates/woocommerce/emails/customer-quickpay-payment-link.php (modified) (2 diffs)
-
tags/7.5.0/templates/woocommerce/emails/plain/customer-quickpay-payment-link.php (modified) (2 diffs)
-
tags/7.5.0/views/html-notice-update.php (modified) (2 diffs)
-
tags/7.5.0/views/html-notice-upgrading.php (modified) (1 diff)
-
tags/7.5.0/views/html-order-table-transaction-data.php (modified) (2 diffs)
-
tags/7.5.0/woocommerce-quickpay.php (modified) (15 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/assets/javascript/backend.js (modified) (5 diffs)
-
trunk/classes/api/woocommerce-quickpay-api-payment.php (modified) (4 diffs)
-
trunk/classes/api/woocommerce-quickpay-api-subscription.php (modified) (2 diffs)
-
trunk/classes/api/woocommerce-quickpay-api-transaction.php (modified) (2 diffs)
-
trunk/classes/api/woocommerce-quickpay-api.php (modified) (1 diff)
-
trunk/classes/emails/woocommerce-quickpay-payment-link-email.php (modified) (4 diffs)
-
trunk/classes/instances/anyday.php (modified) (1 diff)
-
trunk/classes/instances/apple-pay.php (modified) (1 diff)
-
trunk/classes/instances/fbg1886.php (modified) (1 diff)
-
trunk/classes/instances/google-pay.php (modified) (1 diff)
-
trunk/classes/instances/ideal.php (modified) (1 diff)
-
trunk/classes/instances/instance.php (modified) (1 diff)
-
trunk/classes/instances/klarna.php (modified) (1 diff)
-
trunk/classes/instances/mobilepay-subscriptions.php (modified) (8 diffs)
-
trunk/classes/instances/mobilepay.php (modified) (1 diff)
-
trunk/classes/instances/paypal.php (modified) (1 diff)
-
trunk/classes/instances/quickpay-extra.php (modified) (1 diff)
-
trunk/classes/instances/resurs.php (modified) (1 diff)
-
trunk/classes/instances/sofort.php (modified) (1 diff)
-
trunk/classes/instances/swish.php (modified) (1 diff)
-
trunk/classes/instances/trustly.php (modified) (1 diff)
-
trunk/classes/instances/viabill.php (modified) (1 diff)
-
trunk/classes/instances/vipps.php (modified) (1 diff)
-
trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-action.php (modified) (1 diff)
-
trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-manage-payment.php (modified) (3 diffs)
-
trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-ping.php (modified) (1 diff)
-
trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-private-key.php (modified) (1 diff)
-
trunk/classes/modules/woocommerce-quickpay-admin-orders-lists-table.php (modified) (7 diffs)
-
trunk/classes/modules/woocommerce-quickpay-admin-orders-meta.php (modified) (2 diffs)
-
trunk/classes/modules/woocommerce-quickpay-admin-orders.php (modified) (6 diffs)
-
trunk/classes/modules/woocommerce-quickpay-orders.php (modified) (2 diffs)
-
trunk/classes/modules/woocommerce-quickpay-subscriptions-change-payment-method.php (modified) (1 diff)
-
trunk/classes/updates/woocommerce-quickpay-update-4.6.php (modified) (1 diff)
-
trunk/classes/utils/woocommerce-quickpay-order-payments-utils.php (modified) (1 diff)
-
trunk/classes/utils/woocommerce-quickpay-order-transaction-data-utils.php (modified) (1 diff)
-
trunk/classes/woocommerce-quickpay-callbacks.php (modified) (7 diffs)
-
trunk/classes/woocommerce-quickpay-exceptions.php (modified) (1 diff)
-
trunk/classes/woocommerce-quickpay-helper.php (modified) (5 diffs)
-
trunk/classes/woocommerce-quickpay-install.php (modified) (2 diffs)
-
trunk/classes/woocommerce-quickpay-log.php (modified) (2 diffs)
-
trunk/classes/woocommerce-quickpay-settings.php (modified) (18 diffs)
-
trunk/helpers/notices.php (modified) (1 diff)
-
trunk/helpers/requests.php (modified) (1 diff)
-
trunk/helpers/transactions.php (modified) (1 diff)
-
trunk/languages/woo-quickpay-da_DK.po (deleted)
-
trunk/languages/woo-quickpay.pot (deleted)
-
trunk/languages/woocommerce-quickpay-da_DK.po (added)
-
trunk/languages/woocommerce-quickpay.pot (added)
-
trunk/templates/admin/meta-box-order.php (modified) (2 diffs)
-
trunk/templates/admin/meta-box-subscription.php (modified) (4 diffs)
-
trunk/templates/woocommerce/emails/customer-quickpay-payment-link.php (modified) (2 diffs)
-
trunk/templates/woocommerce/emails/plain/customer-quickpay-payment-link.php (modified) (2 diffs)
-
trunk/views/html-notice-update.php (modified) (2 diffs)
-
trunk/views/html-notice-upgrading.php (modified) (1 diff)
-
trunk/views/html-order-table-transaction-data.php (modified) (2 diffs)
-
trunk/woocommerce-quickpay.php (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-quickpay/tags/7.5.0/README.txt
r3394934 r3395304 2 2 Contributors: PerfectSolution 3 3 Tags: gateway, payment, quickpay, woocommerce, subscriptions 4 Requires at least: 4.0.05 Tested up to: 6. 56 Stable tag: trunk4 Requires at least: 6.7 5 Tested up to: 6.8 6 Stable tag: 7.5.0 7 7 License: GPLv2 8 License URI: http ://www.gnu.org/licenses/gpl-2.0.html8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 9 10 10 Integrates your Quickpay payment gateway into your WooCommerce installation. … … 27 27 3. If WooCommerce Subscriptions is used, the required minimum version is >= 5.0 28 28 29 == External services == 30 31 This plugin uses the Quickpay API which is necessary to process payments in your store. 32 33 The information sent to Quickpay is based on the information stored in your WooCommerce store and can be adjusted 34 in the plugin settings, but transaction details may include order information and customer details. 35 36 Link to Quickpay terms of service: https://quickpay.net/terms-of-service/ 37 29 38 == 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 30 47 = 7.4.0 = 31 48 * 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 67 67 url: quickpayBackend.ajax_url + 'admin/manage-payment', 68 68 dataType: 'json', 69 data: $.extend({}, {post: this.postID }, dataObject),69 data: $.extend({}, {post: this.postID, '_wpnonce': quickpayBackend.nonce}, dataObject), 70 70 beforeSend: $.proxy(this.showLoader, this, true), 71 71 success: function () { … … 104 104 105 105 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) { 107 107 if (response.success === true) { 108 108 this.indicator.addClass('ok').removeClass('error'); … … 142 142 e.preventDefault(); 143 143 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) { 145 145 wcqpInsertAjaxResponseMessage(response); 146 146 emptyLogsButton.prop('disabled', false); … … 152 152 e.preventDefault(); 153 153 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) { 155 155 wcqpInsertAjaxResponseMessage(response); 156 156 flushCacheButton.prop('disabled', false); … … 183 183 if (!self.refresh.hasClass('ok')) { 184 184 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) { 186 186 if (response.success === true) { 187 187 self.field.val(response.data.private_key); -
woocommerce-quickpay/tags/7.5.0/classes/api/woocommerce-quickpay-api-payment.php
r2924617 r3395304 57 57 } 58 58 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 ); 60 60 61 61 $this->check_last_operation_of_type_with_location_fallback( 'capture', $order, $request ); … … 87 87 88 88 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 ) )) ); 90 90 } 91 91 } 92 92 93 93 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 ) )) ); 95 95 } 96 96 97 97 98 98 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 ) )); 100 100 } 101 101 } … … 115 115 */ 116 116 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" ) ); 118 118 } 119 119 … … 147 147 $product = reset( $basket_items ); 148 148 149 $request = $this->post( sprintf( '% d/%s', $transaction_id, "refund" ), [149 $request = $this->post( sprintf( '%1$d/%2$s', $transaction_id, "refund" ), [ 150 150 'amount' => WC_QuickPay_Helper::price_multiply( $amount, $order->get_currency() ), 151 151 'vat_rate' => $product['vat_rate'], -
woocommerce-quickpay/tags/7.5.0/classes/api/woocommerce-quickpay-api-subscription.php
r2924617 r3395304 52 52 $order_number = WC_QuickPay_Order_Payments_Utils::get_order_number_for_api( $order, true ); 53 53 54 $request_url = sprintf( '% d/%s',$subscription_id, "recurring" );54 $request_url = sprintf( '%1$d/%2$s', (int) $subscription_id, "recurring" ); 55 55 56 56 $request_data = apply_filters( 'woocommerce_quickpay_create_recurring_payment_data', [ … … 82 82 */ 83 83 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" ) ); 85 85 } 86 86 -
woocommerce-quickpay/tags/7.5.0/classes/api/woocommerce-quickpay-api-transaction.php
r2924617 r3395304 82 82 83 83 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' ); 85 85 } 86 86 … … 395 395 396 396 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' ) ); 398 398 } 399 399 -
woocommerce-quickpay/tags/7.5.0/classes/api/woocommerce-quickpay-api.php
r2924617 r3395304 235 235 throw new QuickPay_API_Exception( $this->resource_data->message, $response_code, null, $curl_request_url, $request_form_data, $response_data ); 236 236 } 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 ); 238 238 } 239 239 -
woocommerce-quickpay/tags/7.5.0/classes/emails/woocommerce-quickpay-payment-link-email.php
r2924617 r3395304 11 11 $this->customer_email = true; 12 12 $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' ); 15 15 $this->template_html = 'emails/customer-quickpay-payment-link.php'; 16 16 $this->template_plain = 'emails/plain/customer-quickpay-payment-link.php'; … … 91 91 $this->form_fields = [ 92 92 'enabled' => [ 93 'title' => __( 'Enable/Disable', 'woocommerce' ),93 'title' => esc_html__( 'Enable/Disable', 'woocommerce-quickpay' ), 94 94 'type' => 'checkbox', 95 'label' => __( 'Enable this email notification', 'woocommerce' ),95 'label' => esc_html__( 'Enable this email notification', 'woocommerce-quickpay' ), 96 96 'default' => 'yes', 97 97 ], 98 98 'subject' => [ 99 'title' => __( 'Subject', 'woocommerce' ),99 'title' => esc_html__( 'Subject', 'woocommerce-quickpay' ), 100 100 'type' => 'text', 101 101 'desc_tip' => true, 102 102 /* 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>' ), 104 104 'placeholder' => $this->get_default_subject(), 105 105 'default' => '', 106 106 ], 107 107 'heading' => [ 108 'title' => __( 'Email heading', 'woocommerce' ),108 'title' => esc_html__( 'Email heading', 'woocommerce-quickpay' ), 109 109 'type' => 'text', 110 110 'desc_tip' => true, 111 111 /* 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>' ), 113 113 'placeholder' => $this->get_default_heading(), 114 114 'default' => '', 115 115 ], 116 116 'email_type' => [ 117 'title' => __( 'Email type', 'woocommerce' ),117 'title' => esc_html__( 'Email type', 'woocommerce-quickpay' ), 118 118 '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' ), 120 120 'default' => 'html', 121 121 'class' => 'email_type wc-enhanced-select', … … 133 133 */ 134 134 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' ); 136 136 } 137 137 … … 143 143 */ 144 144 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' ); 146 146 } 147 147 } -
woocommerce-quickpay/tags/7.5.0/classes/instances/anyday.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 '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' ), 38 39 'default' => 'no' 39 40 ], 40 41 '_Shop_setup' => [ 41 42 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),43 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 44 ], 44 45 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),46 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 47 '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' ) 49 50 ], 50 51 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),52 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 53 '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' ) 55 57 ], 56 58 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/apple-pay.php
r3095043 r3395304 34 34 $this->form_fields = [ 35 35 'enabled' => [ 36 'title' => __( 'Enable', 'woo-quickpay' ),36 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 37 37 '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' ), 39 40 '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' ) 41 43 ], 42 44 '_Shop_setup' => [ 43 45 'type' => 'title', 44 'title' => __( 'Shop setup', 'woo-quickpay' ),46 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 45 47 ], 46 48 'title' => [ 47 'title' => __( 'Title', 'woo-quickpay' ),49 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 48 50 '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' ) 51 53 ], 52 54 'description' => [ 53 'title' => __( 'Customer Message', 'woo-quickpay' ),55 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 54 56 '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' ) 57 60 ], 58 61 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/fbg1886.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Forbrugsforeningen payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Forbrugsforeningen payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/google-pay.php
r3095043 r3395304 49 49 $this->form_fields = [ 50 50 'enabled' => [ 51 'title' => __( 'Enable', 'woo-quickpay' ),51 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 52 52 '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' ), 55 57 'default' => 'no' 56 58 ], 57 59 '_Shop_setup' => [ 58 60 'type' => 'title', 59 'title' => __( 'Shop setup', 'woo-quickpay' ),61 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 60 62 ], 61 63 'title' => [ 62 'title' => __( 'Title', 'woo-quickpay' ),64 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 63 65 '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' ) 66 68 ], 67 69 'description' => [ 68 'title' => __( 'Customer Message', 'woo-quickpay' ),70 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 69 71 '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' ) 72 75 ], 73 76 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/ideal.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable iDEAL payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable iDEAL payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/instance.php
r3095043 r3395304 55 55 ]; 56 56 57 $allowed_html = [ 58 'a' => [ 59 'href' => [], 60 ], 61 ]; 62 57 63 $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>"; 61 69 62 70 $html .= get_parent_class( get_parent_class( get_parent_class( $this ) ) )::generate_settings_html( $form_fields, $echo ); 63 71 64 72 if ( $echo ) { 65 echo $html; // WPCS: XSS ok.73 echo wp_kses_post($html); // WPCS: XSS ok. 66 74 } else { 67 75 return $html; -
woocommerce-quickpay/tags/7.5.0/classes/instances/klarna.php
r3095043 r3395304 34 34 $this->form_fields = [ 35 35 'enabled' => [ 36 'title' => __( 'Enable', 'woo-quickpay' ),36 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 37 37 'type' => 'checkbox', 38 'label' => __( 'Enable Klarna payment', 'woo-quickpay' ),38 'label' => esc_html__( 'Enable Klarna payment', 'woocommerce-quickpay' ), 39 39 'default' => 'no' 40 40 ], 41 41 '_Shop_setup' => [ 42 42 'type' => 'title', 43 'title' => __( 'Shop setup', 'woo-quickpay' ),43 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 44 44 ], 45 45 'title' => [ 46 'title' => __( 'Title', 'woo-quickpay' ),46 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 47 47 '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') 50 50 ], 51 51 'description' => [ 52 'title' => __( 'Customer Message', 'woo-quickpay' ),52 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 53 53 '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') 56 56 ], 57 57 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/mobilepay-subscriptions.php
r3095043 r3395304 65 65 // Check if the subscription has the allowed status 66 66 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' ); 68 68 // If the setting has been set to cancelled, we will run the cancel_order method on the subscription to 69 69 // take advantage of the built-in pending-cancel/cancelled functionality. … … 149 149 $this->form_fields = [ 150 150 'enabled' => [ 151 'title' => __( 'Enable', 'woo-quickpay' ),151 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 152 152 '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() ), 154 155 'default' => 'no' 155 156 ], 156 157 '_Shop_setup' => [ 157 158 'type' => 'title', 158 'title' => __( 'Shop setup', 'woo-quickpay' ),159 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 159 160 ], 160 161 'title' => [ 161 'title' => __( 'Title', 'woo-quickpay' ),162 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 162 163 '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' ), 164 165 'default' => $this->get_sanitized_method_title(), 165 166 ], 166 167 'description' => [ 167 'title' => __( 'Customer Message', 'woo-quickpay' ),168 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 168 169 '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() ), 171 173 ], 172 174 [ … … 175 177 ], 176 178 'checkout_instant_activation' => [ 177 'title' => __( 'Activate subscriptions immediately.', 'woo-quickpay' ),179 'title' => esc_html__( 'Activate subscriptions immediately.', 'woocommerce-quickpay' ), 178 180 'type' => 'checkbox', 179 'label' => __( 'Enable', 'woo-quickpay' ),181 'label' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 180 182 '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' ), 182 184 ], 183 185 'checkout_prefill_phone_number' => [ 184 'title' => __( 'Pre-fill phone number', 'woo-quickpay' ),186 'title' => esc_html__( 'Pre-fill phone number', 'woocommerce-quickpay' ), 185 187 'type' => 'checkbox', 186 'label' => __( 'Enable', 'woo-quickpay' ),188 'label' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 187 189 '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' ), 189 191 ], 190 192 [ … … 193 195 ], 194 196 'renewal_keep_active' => [ 195 'title' => __( 'Keep subscription active', 'woo-quickpay' ),197 'title' => esc_html__( 'Keep subscription active', 'woocommerce-quickpay' ), 196 198 'type' => 'checkbox', 197 'label' => __( 'Enable', 'woo-quickpay' ),199 'label' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 198 200 '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' ), 200 202 ], 201 203 [ 202 204 'type' => 'title', 203 'title' => __( 'Agreements', 'woo-quickpay' )205 'title' => esc_html__( 'Agreements', 'woocommerce-quickpay' ) 204 206 ], 205 207 'mps_transaction_cancellation_status' => [ 206 'title' => __( 'Cancelled agreements status', 'woo-quickpay' ),208 'title' => esc_html__( 'Cancelled agreements status', 'woocommerce-quickpay' ), 207 209 'type' => 'select', 208 210 'class' => 'wc-enhanced-select', 209 211 'css' => 'width: 450px;', 210 212 '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' ), 212 214 'options' => $this->get_mps_cancel_agreement_status_options(), 213 215 'custom_attributes' => [ 214 'data-placeholder' => __( 'Select status', 'woo-quickpay' )216 'data-placeholder' => esc_html__( 'Select status', 'woocommerce-quickpay' ) 215 217 ] 216 218 ], … … 220 222 private function get_mps_cancel_agreement_status_options() { 221 223 return apply_filters( 'woocommerce_quickpay_mps_cancel_agreement_status_options', [ 222 'none' => __( 'Do nothing', 'woo-quickpay' ),224 'none' => esc_html__( 'Do nothing', 'woocommerce-quickpay' ), 223 225 'on-hold' => wc_get_order_status_name( 'on-hold' ), 224 226 'cancelled' => wc_get_order_status_name( 'cancelled' ), … … 287 289 if ( empty( $data['due_date'] ) ) { 288 290 $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() ); 290 293 } 291 294 … … 306 309 307 310 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' ) ); 309 312 $subscription->save(); 310 313 } … … 355 358 '_quickpay_transaction_id' => [ 356 359 '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' ), 358 361 ], 359 362 ], -
woocommerce-quickpay/tags/7.5.0/classes/instances/mobilepay.php
r3095043 r3395304 32 32 $this->form_fields = [ 33 33 'enabled' => [ 34 'title' => __( 'Enable', 'woo-quickpay' ),34 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 35 35 'type' => 'checkbox', 36 'label' => __( 'Enable MobilePay payment', 'woo-quickpay' ),36 'label' => esc_html__( 'Enable MobilePay payment', 'woocommerce-quickpay' ), 37 37 'default' => 'no', 38 38 ], 39 39 '_Shop_setup' => [ 40 40 'type' => 'title', 41 'title' => __( 'Shop setup', 'woo-quickpay' ),41 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 42 42 ], 43 43 'title' => [ 44 'title' => __( 'Title', 'woo-quickpay' ),44 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 45 45 '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' ), 48 48 ], 49 49 'description' => [ 50 'title' => __( 'Customer Message', 'woo-quickpay' ),50 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 51 51 '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' ), 54 54 ] 55 55 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/paypal.php
r3095043 r3395304 35 35 $this->form_fields = [ 36 36 'enabled' => [ 37 'title' => __( 'Enable', 'woo-quickpay' ),37 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 38 38 'type' => 'checkbox', 39 'label' => __( 'Enable PayPal payment', 'woo-quickpay' ),39 'label' => esc_html__( 'Enable PayPal payment', 'woocommerce-quickpay' ), 40 40 'default' => 'no' 41 41 ], 42 42 '_Shop_setup' => [ 43 43 'type' => 'title', 44 'title' => __( 'Shop setup', 'woo-quickpay' ),44 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 45 45 ], 46 46 'title' => [ 47 'title' => __( 'Title', 'woo-quickpay' ),47 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 48 48 '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' ) 51 51 ], 52 52 'description' => [ 53 'title' => __( 'Customer Message', 'woo-quickpay' ),53 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 54 54 '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' ) 57 57 ], 58 58 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/quickpay-extra.php
r3095043 r3395304 39 39 $this->form_fields = [ 40 40 'enabled' => [ 41 'title' => __( 'Enable', 'woo-quickpay' ),41 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 42 42 'type' => 'checkbox', 43 'label' => __( 'Enable Extra QuickPay gateway', 'woo-quickpay' ),43 'label' => esc_html__( 'Enable Extra QuickPay gateway', 'woocommerce-quickpay' ), 44 44 'default' => 'no' 45 45 ], 46 46 '_Shop_setup' => [ 47 47 'type' => 'title', 48 'title' => __( 'Shop setup', 'woo-quickpay' ),48 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 49 49 ], 50 50 'title' => [ 51 'title' => __( 'Title', 'woo-quickpay' ),51 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 'description' => [ 57 'title' => __( 'Customer Message', 'woo-quickpay' ),57 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 58 58 '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' ) 61 61 ], 62 62 'cardtypelock' => [ 63 'title' => __( 'Payment methods', 'woo-quickpay' ),63 'title' => esc_html__( 'Payment methods', 'woocommerce-quickpay' ), 64 64 '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' ), 66 66 'default' => 'creditcard', 67 67 ], 68 68 'quickpay_icons' => [ 69 'title' => __( 'Credit card icons', 'woo-quickpay' ),69 'title' => esc_html__( 'Credit card icons', 'woocommerce-quickpay' ), 70 70 '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' ), 72 72 'desc_tip' => true, 73 73 'class' => 'wc-enhanced-select', 74 74 'css' => 'width: 450px;', 75 75 'custom_attributes' => [ 76 'data-placeholder' => __( 'Select icons', 'woo-quickpay' )76 'data-placeholder' => esc_html__( 'Select icons', 'woocommerce-quickpay' ) 77 77 ], 78 78 'default' => '', -
woocommerce-quickpay/tags/7.5.0/classes/instances/resurs.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Resurs payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Resurs payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/sofort.php
r3095043 r3395304 34 34 $this->form_fields = [ 35 35 'enabled' => [ 36 'title' => __( 'Enable', 'woo-quickpay' ),36 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 37 37 'type' => 'checkbox', 38 'label' => __( 'Enable Sofort payment', 'woo-quickpay' ),38 'label' => esc_html__( 'Enable Sofort payment', 'woocommerce-quickpay' ), 39 39 'default' => 'no' 40 40 ], 41 41 '_Shop_setup' => [ 42 42 'type' => 'title', 43 'title' => __( 'Shop setup', 'woo-quickpay' ),43 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 44 44 ], 45 45 'title' => [ 46 'title' => __( 'Title', 'woo-quickpay' ),46 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 47 47 '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' ) 50 50 ], 51 51 'description' => [ 52 'title' => __( 'Customer Message', 'woo-quickpay' ),52 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 53 53 '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' ) 56 56 ], 57 57 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/swish.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Swish payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Swish payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/trustly.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Trustly payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Trustly payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/viabill.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable ViaBill payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable ViaBill payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/tags/7.5.0/classes/instances/vipps.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Vipps payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Vipps payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-action.php
r2924617 r3395304 34 34 */ 35 35 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' ) ); 38 39 } 39 40 -
woocommerce-quickpay/tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-manage-payment.php
r2924617 r3395304 9 9 public function execute(): void { 10 10 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'] ) ); 13 13 14 14 if ( ! woocommerce_quickpay_can_user_manage_payments( $param_action ) ) { … … 34 34 if ( method_exists( $payment, $param_action ) ) { 35 35 // 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(); 37 37 38 38 // Call the action method and parse the transaction id and order object … … 43 43 } // The action was not allowed. Throw an exception 44 44 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() ) ); 46 46 } 47 47 } catch ( QuickPay_Exception $e ) { -
woocommerce-quickpay/tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-ping.php
r2924617 r3395304 10 10 if ( ! empty( $_POST['api_key'] ) ) { 11 11 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']) ) ); 13 13 $api->get( '/payments?page_size=1' ); 14 14 wp_send_json_success(); -
woocommerce-quickpay/tags/7.5.0/classes/modules/ajax/woocommerce-quickpay-admin-ajax-private-key.php
r2924617 r3395304 10 10 try { 11 11 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' ) ); 13 13 } 14 14 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' ) ); 17 19 } 18 20 19 $api_key = $_POST['api_key'];21 $api_key = sanitize_text_field( wp_unslash( $_POST['api_key'] ) ); 20 22 21 23 $api = new WC_QuickPay_API( $api_key ); -
woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-admin-orders-lists-table.php
r3079637 r3395304 40 40 public function filter_shop_order_posts_columns( $show_columns ): array { 41 41 $column_name = 'quickpay_transaction_info'; 42 $column_header = __( 'Payment', 'woo-quickpay' );42 $column_header = esc_html__( 'Payment', 'woocommerce-quickpay' ); 43 43 44 44 return WC_QuickPay_Helper::array_insert_after( 'shipping_address', $show_columns, $column_name, $column_header ); … … 80 80 'transaction_brand' => $brand, 81 81 '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(), 83 83 'transaction_is_test' => $transaction->is_test(), 84 84 'is_cached' => $transaction->is_loaded_from_cached(), … … 98 98 public function order_bulk_actions( array $actions ): array { 99 99 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' ); 102 102 } 103 103 … … 112 112 public function subscription_bulk_actions( array $actions ): array { 113 113 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' ); 115 115 } 116 116 … … 133 133 134 134 // Redirect client 135 wp_ redirect( $_SERVER['HTTP_REFERER']);135 wp_safe_redirect( wp_unslash($_SERVER['HTTP_REFERER'] ?? $redirect_to) ); 136 136 exit; 137 137 } … … 149 149 150 150 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) ); 155 156 exit; 156 157 } … … 180 181 181 182 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) ); 186 188 exit; 187 189 } -
woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-admin-orders-meta.php
r2924617 r3395304 28 28 if ( WC_QuickPay_Requests_Utils::is_current_admin_screen( $screen_orders, $screen_subs ) ) { 29 29 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' ); 32 32 } 33 33 } … … 125 125 $state = $transaction->get_state(); 126 126 try { 127 $status = $transaction->get_current_type() . ' (' . __( 'subscription', 'woo-quickpay' ) . ')';127 $status = $transaction->get_current_type() . ' (' . esc_html__( 'subscription', 'woocommerce-quickpay' ) . ')'; 128 128 } catch ( QuickPay_API_Exception $e ) { 129 129 if ( 'initial' !== $state ) { -
woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-admin-orders.php
r2932188 r3395304 35 35 // By default, we will skip payment link creation if the order is paid already. 36 36 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' ); 38 39 39 40 return; … … 51 52 52 53 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' ) ); 54 55 } 55 56 $resource_order = wc_get_order( $order_parent_id ); … … 103 104 // Check URL 104 105 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() ) ); 106 108 } 107 109 … … 118 120 // Make sure to save the changes to the order/subscription object 119 121 $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 ); 121 124 122 125 do_action( 'woocommerce_quickpay_order_action_payment_link_created', $link->url, $order ); … … 124 127 return true; 125 128 } 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' ); 127 131 128 132 return false; … … 153 157 */ 154 158 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' ); 156 160 157 161 return $actions; -
woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-orders.php
r2924617 r3395304 27 27 if ( $transaction->is_action_allowed( 'cancel' ) ) { 28 28 $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' ) ); 30 30 } 31 31 } catch ( Exception $e ) { … … 55 55 56 56 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' ) ); 58 58 } 59 59 } -
woocommerce-quickpay/tags/7.5.0/classes/modules/woocommerce-quickpay-subscriptions-change-payment-method.php
r2924617 r3395304 20 20 public function maybe_apply_description_notice( ?string $description, string $gateway_id ): ?string { 21 21 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 ); 23 27 } 24 28 -
woocommerce-quickpay/tags/7.5.0/classes/updates/woocommerce-quickpay-update-4.6.php
r2924617 r3395304 51 51 } 52 52 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 ) ); 54 54 } 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() ) ); 56 56 } 57 57 } -
woocommerce-quickpay/tags/7.5.0/classes/utils/woocommerce-quickpay-order-payments-utils.php
r3250888 r3395304 64 64 $fee = new WC_Order_Item_Fee(); 65 65 66 $fee->set_name( __( 'Payment Fee', 'woo -quickpay' ) );66 $fee->set_name( __( 'Payment Fee', 'woocommerce-quickpay' ) ); 67 67 $fee->set_total( $fee_in_cents / 100 ); 68 68 $fee->set_tax_status( 'none' ); -
woocommerce-quickpay/tags/7.5.0/classes/utils/woocommerce-quickpay-order-transaction-data-utils.php
r3250888 r3395304 109 109 // Single: Order Email 110 110 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(); 112 112 } 113 113 114 114 // Single: Order Phone 115 115 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(); 117 117 } 118 118 119 119 // Single: Browser User Agent 120 120 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(); 122 122 } 123 123 124 124 // Single: Shipping Method 125 125 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(); 127 127 } 128 128 -
woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-callbacks.php
r3250888 r3395304 24 24 $order->set_transaction_id( $transaction->id ); 25 25 } 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() ) ); 27 27 } 28 28 WC_Pre_Orders_Order::mark_order_as_pre_ordered( $order ); … … 38 38 39 39 // 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 ) ); 41 42 42 43 // Fallback to save transaction IDs since this has seemed to sometimes fail when using WC_Order::payment_complete … … 53 54 */ 54 55 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' ); 56 57 57 58 $complete = WC_QuickPay_Helper::option_is_enabled( WC_QP()->s( 'quickpay_complete_on_capture' ) ) && ! $order->has_status( 'completed' ); … … 87 88 // Allow 3rd party code to overwrite the note 88 89 $transition_status_note = apply_filters( 'woocommerce_quickpay_payment_cancelled_order_transition_status_note', 89 __( 'Payment cancelled.', 'woo -quickpay' ),90 __( 'Payment cancelled.', 'woocommerce-quickpay' ), 90 91 $order, 91 92 $transaction, … … 112 113 */ 113 114 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 ) ); 115 117 // Activate the subscription 116 118 … … 197 199 198 200 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'] ) ) ) ); 200 202 } 201 203 … … 221 223 222 224 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'] ) ) ) ); 224 226 } 225 227 -
woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-exceptions.php
r3095043 r3395304 68 68 */ 69 69 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' ), 74 73 $this->log->get_domain() 75 ) ;74 )); 76 75 } 77 76 } -
woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-helper.php
r3045559 r3395304 124 124 wp_enqueue_script( 'quickpay-backend', plugins_url( '/assets/javascript/backend.js', __DIR__ ), [ 'jquery' ], self::static_version() ); 125 125 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' ), 127 128 ] ); 128 129 } … … 136 137 */ 137 138 protected static function maybe_enqueue_admin_statics(): bool { 138 global $post;139 139 /** 140 140 * Enqueue on the settings page for the gateways 141 141 */ 142 142 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() ) ) ) { 144 144 return true; 145 145 } … … 177 177 */ 178 178 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/' ); 180 180 } 181 181 … … 324 324 */ 325 325 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'; 327 327 } 328 328 … … 369 369 } 370 370 371 $u_agent = $_SERVER['HTTP_USER_AGENT'];371 $u_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); 372 372 $name = 'Unknown'; 373 373 -
woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-install.php
r2459034 r3395304 142 142 */ 143 143 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; 145 145 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' ) ] ); 148 148 exit; 149 149 } … … 151 151 self::update(); 152 152 153 echo json_encode( [ 'status' => 'success' ] );153 echo wp_json_encode( [ 'status' => 'success' ] ); 154 154 155 155 exit; -
woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-log.php
r3076215 r3395304 61 61 62 62 if ( is_array( $param ) ) { 63 $message .= print_r( $param, true);63 $message .= wp_json_encode( $param, JSON_PRETTY_PRINT ); 64 64 } 65 65 … … 110 110 */ 111 111 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', '>=' ) ) { 114 114 $args = [ 115 'page' => 'wc-status',116 'tab' => 'logs',115 'page' => 'wc-status', 116 'tab' => 'logs', 117 117 'source' => $this->_domain 118 118 ]; -
woocommerce-quickpay/tags/7.5.0/classes/woocommerce-quickpay-settings.php
r3394934 r3395304 24 24 [ 25 25 'enabled' => [ 26 'title' => __( 'Enable', 'woo-quickpay' ),26 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 27 27 'type' => 'checkbox', 28 'label' => __( 'Enable Quickpay Payment', 'woo-quickpay' ),28 'label' => esc_html__( 'Enable Quickpay Payment', 'woocommerce-quickpay' ), 29 29 'default' => 'yes' 30 30 ], … … 32 32 '_Account_setup' => [ 33 33 'type' => 'title', 34 'title' => __( 'API - Integration', 'woo-quickpay' ),34 'title' => esc_html__( 'API - Integration', 'woocommerce-quickpay' ), 35 35 ], 36 36 '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' ), 40 40 'desc_tip' => true, 41 41 ], 42 42 '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' ), 46 46 'desc_tip' => true, 47 47 ], 48 48 '_Autocapture' => [ 49 49 'type' => 'title', 50 'title' => __( 'Autocapture settings', 'woo-quickpay' )50 'title' => esc_html__( 'Autocapture settings', 'woocommerce-quickpay' ) 51 51 ], 52 52 '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' ), 57 57 'default' => 'no', 58 58 'desc_tip' => false, 59 59 ], 60 60 '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' ), 65 65 'default' => 'no', 66 66 'desc_tip' => false, … … 68 68 '_caching' => [ 69 69 'type' => 'title', 70 'title' => __( 'Transaction Cache', 'woo-quickpay' )70 'title' => esc_html__( 'Transaction Cache', 'woocommerce-quickpay' ) 71 71 ], 72 72 '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' => [] ] ), 76 76 'default' => 'yes', 77 77 'desc_tip' => false, 78 78 ], 79 79 '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' ), 82 82 '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' ), 84 84 'default' => 7 * DAY_IN_SECONDS, 85 85 'desc_tip' => false, … … 88 88 '_Extra_gateway_settings' => [ 89 89 'type' => 'title', 90 'title' => __( 'Extra gateway settings', 'woo-quickpay' )90 'title' => esc_html__( 'Extra gateway settings', 'woocommerce-quickpay' ) 91 91 ], 92 92 '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' ), 96 96 'default' => 'creditcard', 97 97 ], 98 98 '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' ), 102 102 'default' => '', 103 103 'desc_tip' => true, … … 105 105 106 106 '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' ), 111 111 'default' => 'no', 112 112 'desc_tip' => true, 113 113 ], 114 114 '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' ), 127 127 'default' => 'no', 128 128 ], 129 129 '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' ), 131 131 'type' => 'select', 132 132 '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' ), 135 135 'default' => 'no', 136 136 ], 137 137 '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' ), 142 142 'default' => 'no', 143 143 ], 144 144 'quickpay_text_on_statement' => [ 145 'title' => __( 'Text on statement', 'woo-quickpay' ),145 'title' => esc_html__( 'Text on statement', 'woocommerce-quickpay' ), 146 146 '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' ), 148 148 'default' => '', 149 149 'desc_tip' => false, … … 156 156 '_Shop_setup' => [ 157 157 'type' => 'title', 158 'title' => __( 'Shop setup', 'woo-quickpay' ),158 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 159 159 ], 160 160 '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' ), 165 165 'desc_tip' => true, 166 166 ], 167 167 'description' => [ 168 'title' => __( 'Customer Message', 'woo-quickpay' ),168 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 169 169 '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' ), 172 172 'desc_tip' => true, 173 173 ], 174 174 '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' ), 179 179 'desc_tip' => true, 180 180 ], 181 181 'instructions' => [ 182 'title' => __( 'Email instructions', 'woo-quickpay' ),182 'title' => esc_html__( 'Email instructions', 'woocommerce-quickpay' ), 183 183 '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' ), 185 185 'default' => '', 186 186 'desc_tip' => true, 187 187 ], 188 188 'quickpay_icons' => [ 189 'title' => __( 'Credit card icons', 'woo-quickpay' ),189 'title' => esc_html__( 'Credit card icons', 'woocommerce-quickpay' ), 190 190 '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' ), 192 192 'desc_tip' => true, 193 193 'class' => 'wc-enhanced-select', 194 194 'css' => 'width: 450px;', 195 195 'custom_attributes' => [ 196 'data-placeholder' => __( 'Select icons', 'woo-quickpay' )196 'data-placeholder' => esc_html__( 'Select icons', 'woocommerce-quickpay' ) 197 197 ], 198 198 'default' => '', … … 200 200 ], 201 201 'quickpay_icons_maxheight' => [ 202 'title' => __( 'Credit card icons maximum height', 'woo-quickpay' ),202 'title' => esc_html__( 'Credit card icons maximum height', 'woocommerce-quickpay' ), 203 203 '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' ), 205 205 'default' => 20, 206 206 'desc_tip' => true, … … 208 208 'Google Analytics' => [ 209 209 'type' => 'title', 210 'title' => __( 'Google Analytics', 'woo-quickpay' ),210 'title' => esc_html__( 'Google Analytics', 'woocommerce-quickpay' ), 211 211 ], 212 212 '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' ), 216 216 'default' => '', 217 217 'desc_tip' => true, … … 219 219 'ShopAdminSetup' => [ 220 220 'type' => 'title', 221 'title' => __( 'Shop Admin Setup', 'woo-quickpay' ),221 'title' => esc_html__( 'Shop Admin Setup', 'woocommerce-quickpay' ), 222 222 ], 223 223 224 224 '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' ), 229 229 'default' => 'yes', 230 230 'desc_tip' => false, … … 233 233 'CustomVariables' => [ 234 234 'type' => 'title', 235 'title' => __( 'Custom Variables', 'woo-quickpay' ),235 'title' => esc_html__( 'Custom Variables', 'woocommerce-quickpay' ), 236 236 ], 237 237 'quickpay_custom_variables' => [ 238 'title' => __( 'Select Information', 'woo-quickpay' ),238 'title' => esc_html__( 'Select Information', 'woocommerce-quickpay' ), 239 239 'type' => 'multiselect', 240 240 'class' => 'wc-enhanced-select', 241 241 'css' => 'width: 450px;', 242 242 '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' ), 244 244 'options' => self::custom_variable_options(), 245 245 'desc_tip' => true, 246 246 'custom_attributes' => [ 247 'data-placeholder' => __( 'Select order data', 'woo-quickpay' )247 'data-placeholder' => esc_html__( 'Select order data', 'woocommerce-quickpay' ) 248 248 ] 249 249 ], … … 257 257 258 258 $fields['subscription_autocomplete_renewal_orders'] = [ 259 'title' => __( 'Complete renewal orders', 'woo-quickpay' ),259 'title' => esc_html__( 'Complete renewal orders', 'woocommerce-quickpay' ), 260 260 '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' ), 263 263 'default' => 'no', 264 264 'desc_tip' => true, … … 267 267 // Creates a subscription transaction on renewal orders and automatically captures payment for it afterwards on callback 268 268 $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' ), 270 270 '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' ), 273 273 'default' => 'no', 274 274 'desc_tip' => true, … … 298 298 ], $statuses ); 299 299 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 ); 303 303 } 304 304 … … 351 351 private static function custom_variable_options() { 352 352 $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' ), 359 359 ]; 360 360 … … 370 370 */ 371 371 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' ) ); 375 375 376 376 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' ) ); 378 378 } 379 379 380 380 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' ) ); 382 382 } 383 383 384 384 $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' ) ); 386 386 387 387 return $html; … … 406 406 407 407 $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' ) 410 410 ]; 411 411 … … 417 417 418 418 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() ) ) ); 421 422 $message .= '<ul>'; 422 423 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>"; 424 425 } 425 426 $message .= '</ul>'; 426 427 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 ) ); 428 429 } 429 430 … … 447 448 448 449 return empty( $_POST[ $post_key ] ) && empty( $setting_key ); 449 450 450 } 451 451 -
woocommerce-quickpay/tags/7.5.0/helpers/notices.php
r3095043 r3395304 110 110 array_walk( $notices, 'esc_html' ); 111 111 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') ); 113 113 echo '<p>' . wp_kses_post( implode( "</p>\n<p>", $notices ) ) . '</p>'; 114 114 echo '</div>'; -
woocommerce-quickpay/tags/7.5.0/helpers/requests.php
r2924617 r3395304 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 3 2 4 /** 3 5 * Ensure that payments.quickpay.net is a trusted redirect host -
woocommerce-quickpay/tags/7.5.0/helpers/transactions.php
r3250888 r3395304 67 67 68 68 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' ) ); 70 70 } 71 71 -
woocommerce-quickpay/tags/7.5.0/templates/admin/meta-box-order.php
r2924617 r3395304 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } // Exit if accessed directly 5 2 6 /** 3 7 * @var WC_QuickPay_API_Transaction $transaction … … 9 13 * @var string $transaction_brand 10 14 */ 15 11 16 ?> 12 17 <?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> 16 21 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 ?> 27 34 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"> 31 38 <span class='qp-balance__currency'> 32 <?php echo $transaction->get_currency() ?>39 <?php echo esc_html( $transaction->get_currency() ) ?> 33 40 </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> 36 43 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"> 39 46 <span class="qp-balance__label"> 40 <?php _e( 'Capture amount', 'woo-quickpay' ) ?>:47 <?php esc_html_e( 'Capture amount', 'woocommerce-quickpay' ) ?>: 41 48 </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> 44 51 <input id='qp-balance__amount-field' type='text' value='<?php echo esc_attr( $transaction->get_formatted_remaining_balance() ) ?> '/> 45 52 </span> 46 </li>53 </li> 47 54 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 ?> 54 61 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"> 69 76 <img src="<?php echo esc_attr( $brand_image_url ) ?>" alt="<?php echo esc_attr( $transaction_brand ) ?>"/> 70 77 </span> 71 <?php endif ?>72 </small>73 </p>78 <?php endif ?> 79 </small> 80 </p> 74 81 <?php endif ?> 75 82 76 83 <?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> 82 89 <?php endif ?> 83 90 84 91 <?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> 90 97 <?php endif ?> 91 98 92 99 <?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> 99 106 <?php endif ?> -
woocommerce-quickpay/tags/7.5.0/templates/admin/meta-box-subscription.php
r2924617 r3395304 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 3 2 4 /** 3 5 * @var string $transaction_status … … 9 11 <p class="woocommerce-quickpay-<?php echo esc_attr( $transaction_status ) ?>"> 10 12 <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) ?> 12 14 </strong> 13 15 </p> … … 17 19 <p> 18 20 <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) ?> 20 22 <span class="qp-meta-card"> 21 23 <img src="<?php echo esc_attr( WC_Quickpay_Helper::get_payment_type_logo( $transaction_brand ) ) ?>" … … 29 31 <p> 30 32 <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) ?> 32 34 </small> 33 35 </p> -
woocommerce-quickpay/tags/7.5.0/templates/woocommerce/emails/customer-quickpay-payment-link.php
r2100188 r3395304 25 25 26 26 <?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> 28 28 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> 30 30 31 31 <?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> 33 33 <?php 34 34 … … 54 54 ?> 55 55 <p> 56 <?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce ' ); ?>56 <?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce-quickpay' ); ?> 57 57 </p> 58 58 <?php -
woocommerce-quickpay/tags/7.5.0/templates/woocommerce/emails/plain/customer-quickpay-payment-link.php
r2100188 r3395304 23 23 24 24 /* translators: %s: Customer first name */ 25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce ' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce-quickpay' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n"; 26 26 27 echo esc_html__( 'Thank you for your order.', 'woo -quickpay' ) . "\n\n";27 echo esc_html__( 'Thank you for your order.', 'woocommerce-quickpay' ) . "\n\n"; 28 28 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 */ 30 echo esc_html(sprintf(__( 'Use the following link to pay and complete your order: %s', 'woocommerce-quickpay' ). $payment_link)). "\n\n"; 30 31 31 32 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n"; … … 52 53 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); 53 54 54 echo esc_html__( 'Thanks for shopping with us.', 'woocommerce ' ) . "\n\n";55 echo esc_html__( 'Thanks for shopping with us.', 'woocommerce-quickpay' ) . "\n\n"; 55 56 56 57 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n"; -
woocommerce-quickpay/tags/7.5.0/views/html-notice-update.php
r3394934 r3395304 10 10 ?> 11 11 <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> 15 15 </div> 16 16 <script type="text/javascript"> 17 17 (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:line18 $('.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 20 20 21 21 if (confirm) { … … 24 24 message.find('p').fadeOut(); 25 25 26 $.post('<?php echo admin_url('admin-ajax.php'); ?>', {26 $.post('<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>', { 27 27 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() ); ?>' 29 29 }, 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' ); ?>")); 31 31 }); 32 32 } -
woocommerce-quickpay/tags/7.5.0/views/html-notice-upgrading.php
r3394934 r3395304 10 10 ?> 11 11 <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> 15 14 </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 1 3 <div class="woocommerce-quickpay-order-transaction-data"> 2 4 <table border="0" cellpadding="0" cellspacing="0" class="meta"> 3 5 <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> 6 8 </tr> 7 9 <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> 10 12 </tr> 11 13 <tr> 12 <td><?php _e('Method', 'woo-quickpay' ) ?>:</td>14 <td><?php esc_html_e('Method', 'woocommerce-quickpay' ) ?>:</td> 13 15 <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> 15 17 </td> 16 18 </tr> … … 18 20 <div class="tags"> 19 21 <?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> 22 24 <?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) ?> 25 27 </span> 26 28 <?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> 29 31 <?php endif; ?> 30 32 -
woocommerce-quickpay/tags/7.5.0/woocommerce-quickpay.php
r3394934 r3395304 4 4 * Plugin URI: http://wordpress.org/plugins/woocommerce-quickpay/ 5 5 * Description: Integrates your Quickpay payment gateway into your WooCommerce installation. 6 * Version: 7. 4.06 * Version: 7.5.0 7 7 * Author: Perfect Solution 8 * Text Domain: woo -quickpay8 * Text Domain: woocommerce-quickpay 9 9 * Domain Path: /languages/ 10 10 * Author URI: http://perfect-solution.dk 11 11 * Wiki: http://quickpay.perfect-solution.dk/ 12 12 * 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 14 16 * Requires Plugins: woocommerce 15 17 */ … … 20 22 } 21 23 22 define( 'WCQP_VERSION', '7. 4.0' );24 define( 'WCQP_VERSION', '7.5.0' ); 23 25 define( 'WCQP_URL', plugins_url( __FILE__ ) ); 24 26 define( 'WCQP_PATH', plugin_dir_path( __FILE__ ) ); … … 31 33 function wc_quickpay_woocommerce_inactive_notice() { 32 34 $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 ) ); 36 38 } 37 39 … … 333 335 public static function add_action_links( $links ) { 334 336 $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>', 336 338 ], $links ); 337 339 … … 404 406 public function payment_fields(): void { 405 407 if ( $description = $this->get_description() ) { 406 echo wp autop( wptexturize( $description) );408 echo wp_kses_post( wpautop( wptexturize( $description ) ) ); 407 409 } 408 410 } … … 527 529 // Check if there is a transaction ID 528 530 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 ) ); 530 533 } 531 534 … … 537 540 if ( ! $payment->is_action_allowed( 'refund' ) ) { 538 541 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' ) ); 540 543 } 541 544 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' ) ); 543 546 } 544 547 … … 665 668 '_quickpay_transaction_id' => [ 666 669 'value' => WC_QuickPay_Order_Utils::get_transaction_id( $subscription ), 667 'label' => __( 'QuickPay Transaction ID', 'woo -quickpay' ),670 'label' => __( 'QuickPay Transaction ID', 'woocommerce-quickpay' ), 668 671 ], 669 672 ], … … 693 696 694 697 // 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 ); 696 700 } 697 701 } … … 750 754 // Redirect the customer to account page if the current order is failed 751 755 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 ); 753 763 754 764 wc_add_notice( $payment_failure_text, 'error' ); 755 765 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' ); 762 772 } 763 773 … … 824 834 825 835 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 ) ); 827 838 break; 828 839 … … 871 882 } 872 883 } 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 ) ); 874 886 } 875 887 } catch ( JsonException $e ) { … … 910 922 public function generate_settings_html( $form_fields = array(), $echo = true ) { 911 923 $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>"; 913 926 $html .= WC_QuickPay_Settings::clear_logs_section(); 914 927 … … 924 937 925 938 if ( $echo ) { 926 echo $html; // WPCS: XSS ok.939 echo wp_kses_post( $html ); // WPCS: XSS ok. 927 940 } else { 928 941 return $html; … … 947 960 948 961 if ( $this->instructions ) { 949 echo wp autop( wptexturize( $this->instructions) );962 echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) ); 950 963 } 951 964 } -
woocommerce-quickpay/trunk/README.txt
r3394934 r3395304 2 2 Contributors: PerfectSolution 3 3 Tags: gateway, payment, quickpay, woocommerce, subscriptions 4 Requires at least: 4.0.05 Tested up to: 6. 56 Stable tag: trunk4 Requires at least: 6.7 5 Tested up to: 6.8 6 Stable tag: 7.5.0 7 7 License: GPLv2 8 License URI: http ://www.gnu.org/licenses/gpl-2.0.html8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 9 10 10 Integrates your Quickpay payment gateway into your WooCommerce installation. … … 27 27 3. If WooCommerce Subscriptions is used, the required minimum version is >= 5.0 28 28 29 == External services == 30 31 This plugin uses the Quickpay API which is necessary to process payments in your store. 32 33 The information sent to Quickpay is based on the information stored in your WooCommerce store and can be adjusted 34 in the plugin settings, but transaction details may include order information and customer details. 35 36 Link to Quickpay terms of service: https://quickpay.net/terms-of-service/ 37 29 38 == 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 30 47 = 7.4.0 = 31 48 * 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 67 67 url: quickpayBackend.ajax_url + 'admin/manage-payment', 68 68 dataType: 'json', 69 data: $.extend({}, {post: this.postID }, dataObject),69 data: $.extend({}, {post: this.postID, '_wpnonce': quickpayBackend.nonce}, dataObject), 70 70 beforeSend: $.proxy(this.showLoader, this, true), 71 71 success: function () { … … 104 104 105 105 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) { 107 107 if (response.success === true) { 108 108 this.indicator.addClass('ok').removeClass('error'); … … 142 142 e.preventDefault(); 143 143 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) { 145 145 wcqpInsertAjaxResponseMessage(response); 146 146 emptyLogsButton.prop('disabled', false); … … 152 152 e.preventDefault(); 153 153 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) { 155 155 wcqpInsertAjaxResponseMessage(response); 156 156 flushCacheButton.prop('disabled', false); … … 183 183 if (!self.refresh.hasClass('ok')) { 184 184 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) { 186 186 if (response.success === true) { 187 187 self.field.val(response.data.private_key); -
woocommerce-quickpay/trunk/classes/api/woocommerce-quickpay-api-payment.php
r2924617 r3395304 57 57 } 58 58 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 ); 60 60 61 61 $this->check_last_operation_of_type_with_location_fallback( 'capture', $order, $request ); … … 87 87 88 88 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 ) )) ); 90 90 } 91 91 } 92 92 93 93 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 ) )) ); 95 95 } 96 96 97 97 98 98 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 ) )); 100 100 } 101 101 } … … 115 115 */ 116 116 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" ) ); 118 118 } 119 119 … … 147 147 $product = reset( $basket_items ); 148 148 149 $request = $this->post( sprintf( '% d/%s', $transaction_id, "refund" ), [149 $request = $this->post( sprintf( '%1$d/%2$s', $transaction_id, "refund" ), [ 150 150 'amount' => WC_QuickPay_Helper::price_multiply( $amount, $order->get_currency() ), 151 151 'vat_rate' => $product['vat_rate'], -
woocommerce-quickpay/trunk/classes/api/woocommerce-quickpay-api-subscription.php
r2924617 r3395304 52 52 $order_number = WC_QuickPay_Order_Payments_Utils::get_order_number_for_api( $order, true ); 53 53 54 $request_url = sprintf( '% d/%s',$subscription_id, "recurring" );54 $request_url = sprintf( '%1$d/%2$s', (int) $subscription_id, "recurring" ); 55 55 56 56 $request_data = apply_filters( 'woocommerce_quickpay_create_recurring_payment_data', [ … … 82 82 */ 83 83 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" ) ); 85 85 } 86 86 -
woocommerce-quickpay/trunk/classes/api/woocommerce-quickpay-api-transaction.php
r2924617 r3395304 82 82 83 83 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' ); 85 85 } 86 86 … … 395 395 396 396 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' ) ); 398 398 } 399 399 -
woocommerce-quickpay/trunk/classes/api/woocommerce-quickpay-api.php
r2924617 r3395304 235 235 throw new QuickPay_API_Exception( $this->resource_data->message, $response_code, null, $curl_request_url, $request_form_data, $response_data ); 236 236 } 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 ); 238 238 } 239 239 -
woocommerce-quickpay/trunk/classes/emails/woocommerce-quickpay-payment-link-email.php
r2924617 r3395304 11 11 $this->customer_email = true; 12 12 $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' ); 15 15 $this->template_html = 'emails/customer-quickpay-payment-link.php'; 16 16 $this->template_plain = 'emails/plain/customer-quickpay-payment-link.php'; … … 91 91 $this->form_fields = [ 92 92 'enabled' => [ 93 'title' => __( 'Enable/Disable', 'woocommerce' ),93 'title' => esc_html__( 'Enable/Disable', 'woocommerce-quickpay' ), 94 94 'type' => 'checkbox', 95 'label' => __( 'Enable this email notification', 'woocommerce' ),95 'label' => esc_html__( 'Enable this email notification', 'woocommerce-quickpay' ), 96 96 'default' => 'yes', 97 97 ], 98 98 'subject' => [ 99 'title' => __( 'Subject', 'woocommerce' ),99 'title' => esc_html__( 'Subject', 'woocommerce-quickpay' ), 100 100 'type' => 'text', 101 101 'desc_tip' => true, 102 102 /* 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>' ), 104 104 'placeholder' => $this->get_default_subject(), 105 105 'default' => '', 106 106 ], 107 107 'heading' => [ 108 'title' => __( 'Email heading', 'woocommerce' ),108 'title' => esc_html__( 'Email heading', 'woocommerce-quickpay' ), 109 109 'type' => 'text', 110 110 'desc_tip' => true, 111 111 /* 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>' ), 113 113 'placeholder' => $this->get_default_heading(), 114 114 'default' => '', 115 115 ], 116 116 'email_type' => [ 117 'title' => __( 'Email type', 'woocommerce' ),117 'title' => esc_html__( 'Email type', 'woocommerce-quickpay' ), 118 118 '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' ), 120 120 'default' => 'html', 121 121 'class' => 'email_type wc-enhanced-select', … … 133 133 */ 134 134 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' ); 136 136 } 137 137 … … 143 143 */ 144 144 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' ); 146 146 } 147 147 } -
woocommerce-quickpay/trunk/classes/instances/anyday.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 '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' ), 38 39 'default' => 'no' 39 40 ], 40 41 '_Shop_setup' => [ 41 42 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),43 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 44 ], 44 45 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),46 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 47 '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' ) 49 50 ], 50 51 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),52 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 53 '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' ) 55 57 ], 56 58 ]; -
woocommerce-quickpay/trunk/classes/instances/apple-pay.php
r3095043 r3395304 34 34 $this->form_fields = [ 35 35 'enabled' => [ 36 'title' => __( 'Enable', 'woo-quickpay' ),36 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 37 37 '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' ), 39 40 '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' ) 41 43 ], 42 44 '_Shop_setup' => [ 43 45 'type' => 'title', 44 'title' => __( 'Shop setup', 'woo-quickpay' ),46 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 45 47 ], 46 48 'title' => [ 47 'title' => __( 'Title', 'woo-quickpay' ),49 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 48 50 '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' ) 51 53 ], 52 54 'description' => [ 53 'title' => __( 'Customer Message', 'woo-quickpay' ),55 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 54 56 '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' ) 57 60 ], 58 61 ]; -
woocommerce-quickpay/trunk/classes/instances/fbg1886.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Forbrugsforeningen payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Forbrugsforeningen payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/trunk/classes/instances/google-pay.php
r3095043 r3395304 49 49 $this->form_fields = [ 50 50 'enabled' => [ 51 'title' => __( 'Enable', 'woo-quickpay' ),51 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 52 52 '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' ), 55 57 'default' => 'no' 56 58 ], 57 59 '_Shop_setup' => [ 58 60 'type' => 'title', 59 'title' => __( 'Shop setup', 'woo-quickpay' ),61 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 60 62 ], 61 63 'title' => [ 62 'title' => __( 'Title', 'woo-quickpay' ),64 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 63 65 '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' ) 66 68 ], 67 69 'description' => [ 68 'title' => __( 'Customer Message', 'woo-quickpay' ),70 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 69 71 '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' ) 72 75 ], 73 76 ]; -
woocommerce-quickpay/trunk/classes/instances/ideal.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable iDEAL payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable iDEAL payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/trunk/classes/instances/instance.php
r3095043 r3395304 55 55 ]; 56 56 57 $allowed_html = [ 58 'a' => [ 59 'href' => [], 60 ], 61 ]; 62 57 63 $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>"; 61 69 62 70 $html .= get_parent_class( get_parent_class( get_parent_class( $this ) ) )::generate_settings_html( $form_fields, $echo ); 63 71 64 72 if ( $echo ) { 65 echo $html; // WPCS: XSS ok.73 echo wp_kses_post($html); // WPCS: XSS ok. 66 74 } else { 67 75 return $html; -
woocommerce-quickpay/trunk/classes/instances/klarna.php
r3095043 r3395304 34 34 $this->form_fields = [ 35 35 'enabled' => [ 36 'title' => __( 'Enable', 'woo-quickpay' ),36 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 37 37 'type' => 'checkbox', 38 'label' => __( 'Enable Klarna payment', 'woo-quickpay' ),38 'label' => esc_html__( 'Enable Klarna payment', 'woocommerce-quickpay' ), 39 39 'default' => 'no' 40 40 ], 41 41 '_Shop_setup' => [ 42 42 'type' => 'title', 43 'title' => __( 'Shop setup', 'woo-quickpay' ),43 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 44 44 ], 45 45 'title' => [ 46 'title' => __( 'Title', 'woo-quickpay' ),46 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 47 47 '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') 50 50 ], 51 51 'description' => [ 52 'title' => __( 'Customer Message', 'woo-quickpay' ),52 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 53 53 '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') 56 56 ], 57 57 ]; -
woocommerce-quickpay/trunk/classes/instances/mobilepay-subscriptions.php
r3095043 r3395304 65 65 // Check if the subscription has the allowed status 66 66 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' ); 68 68 // If the setting has been set to cancelled, we will run the cancel_order method on the subscription to 69 69 // take advantage of the built-in pending-cancel/cancelled functionality. … … 149 149 $this->form_fields = [ 150 150 'enabled' => [ 151 'title' => __( 'Enable', 'woo-quickpay' ),151 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 152 152 '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() ), 154 155 'default' => 'no' 155 156 ], 156 157 '_Shop_setup' => [ 157 158 'type' => 'title', 158 'title' => __( 'Shop setup', 'woo-quickpay' ),159 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 159 160 ], 160 161 'title' => [ 161 'title' => __( 'Title', 'woo-quickpay' ),162 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 162 163 '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' ), 164 165 'default' => $this->get_sanitized_method_title(), 165 166 ], 166 167 'description' => [ 167 'title' => __( 'Customer Message', 'woo-quickpay' ),168 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 168 169 '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() ), 171 173 ], 172 174 [ … … 175 177 ], 176 178 'checkout_instant_activation' => [ 177 'title' => __( 'Activate subscriptions immediately.', 'woo-quickpay' ),179 'title' => esc_html__( 'Activate subscriptions immediately.', 'woocommerce-quickpay' ), 178 180 'type' => 'checkbox', 179 'label' => __( 'Enable', 'woo-quickpay' ),181 'label' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 180 182 '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' ), 182 184 ], 183 185 'checkout_prefill_phone_number' => [ 184 'title' => __( 'Pre-fill phone number', 'woo-quickpay' ),186 'title' => esc_html__( 'Pre-fill phone number', 'woocommerce-quickpay' ), 185 187 'type' => 'checkbox', 186 'label' => __( 'Enable', 'woo-quickpay' ),188 'label' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 187 189 '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' ), 189 191 ], 190 192 [ … … 193 195 ], 194 196 'renewal_keep_active' => [ 195 'title' => __( 'Keep subscription active', 'woo-quickpay' ),197 'title' => esc_html__( 'Keep subscription active', 'woocommerce-quickpay' ), 196 198 'type' => 'checkbox', 197 'label' => __( 'Enable', 'woo-quickpay' ),199 'label' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 198 200 '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' ), 200 202 ], 201 203 [ 202 204 'type' => 'title', 203 'title' => __( 'Agreements', 'woo-quickpay' )205 'title' => esc_html__( 'Agreements', 'woocommerce-quickpay' ) 204 206 ], 205 207 'mps_transaction_cancellation_status' => [ 206 'title' => __( 'Cancelled agreements status', 'woo-quickpay' ),208 'title' => esc_html__( 'Cancelled agreements status', 'woocommerce-quickpay' ), 207 209 'type' => 'select', 208 210 'class' => 'wc-enhanced-select', 209 211 'css' => 'width: 450px;', 210 212 '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' ), 212 214 'options' => $this->get_mps_cancel_agreement_status_options(), 213 215 'custom_attributes' => [ 214 'data-placeholder' => __( 'Select status', 'woo-quickpay' )216 'data-placeholder' => esc_html__( 'Select status', 'woocommerce-quickpay' ) 215 217 ] 216 218 ], … … 220 222 private function get_mps_cancel_agreement_status_options() { 221 223 return apply_filters( 'woocommerce_quickpay_mps_cancel_agreement_status_options', [ 222 'none' => __( 'Do nothing', 'woo-quickpay' ),224 'none' => esc_html__( 'Do nothing', 'woocommerce-quickpay' ), 223 225 'on-hold' => wc_get_order_status_name( 'on-hold' ), 224 226 'cancelled' => wc_get_order_status_name( 'cancelled' ), … … 287 289 if ( empty( $data['due_date'] ) ) { 288 290 $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() ); 290 293 } 291 294 … … 306 309 307 310 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' ) ); 309 312 $subscription->save(); 310 313 } … … 355 358 '_quickpay_transaction_id' => [ 356 359 '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' ), 358 361 ], 359 362 ], -
woocommerce-quickpay/trunk/classes/instances/mobilepay.php
r3095043 r3395304 32 32 $this->form_fields = [ 33 33 'enabled' => [ 34 'title' => __( 'Enable', 'woo-quickpay' ),34 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 35 35 'type' => 'checkbox', 36 'label' => __( 'Enable MobilePay payment', 'woo-quickpay' ),36 'label' => esc_html__( 'Enable MobilePay payment', 'woocommerce-quickpay' ), 37 37 'default' => 'no', 38 38 ], 39 39 '_Shop_setup' => [ 40 40 'type' => 'title', 41 'title' => __( 'Shop setup', 'woo-quickpay' ),41 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 42 42 ], 43 43 'title' => [ 44 'title' => __( 'Title', 'woo-quickpay' ),44 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 45 45 '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' ), 48 48 ], 49 49 'description' => [ 50 'title' => __( 'Customer Message', 'woo-quickpay' ),50 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 51 51 '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' ), 54 54 ] 55 55 ]; -
woocommerce-quickpay/trunk/classes/instances/paypal.php
r3095043 r3395304 35 35 $this->form_fields = [ 36 36 'enabled' => [ 37 'title' => __( 'Enable', 'woo-quickpay' ),37 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 38 38 'type' => 'checkbox', 39 'label' => __( 'Enable PayPal payment', 'woo-quickpay' ),39 'label' => esc_html__( 'Enable PayPal payment', 'woocommerce-quickpay' ), 40 40 'default' => 'no' 41 41 ], 42 42 '_Shop_setup' => [ 43 43 'type' => 'title', 44 'title' => __( 'Shop setup', 'woo-quickpay' ),44 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 45 45 ], 46 46 'title' => [ 47 'title' => __( 'Title', 'woo-quickpay' ),47 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 48 48 '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' ) 51 51 ], 52 52 'description' => [ 53 'title' => __( 'Customer Message', 'woo-quickpay' ),53 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 54 54 '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' ) 57 57 ], 58 58 ]; -
woocommerce-quickpay/trunk/classes/instances/quickpay-extra.php
r3095043 r3395304 39 39 $this->form_fields = [ 40 40 'enabled' => [ 41 'title' => __( 'Enable', 'woo-quickpay' ),41 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 42 42 'type' => 'checkbox', 43 'label' => __( 'Enable Extra QuickPay gateway', 'woo-quickpay' ),43 'label' => esc_html__( 'Enable Extra QuickPay gateway', 'woocommerce-quickpay' ), 44 44 'default' => 'no' 45 45 ], 46 46 '_Shop_setup' => [ 47 47 'type' => 'title', 48 'title' => __( 'Shop setup', 'woo-quickpay' ),48 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 49 49 ], 50 50 'title' => [ 51 'title' => __( 'Title', 'woo-quickpay' ),51 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 'description' => [ 57 'title' => __( 'Customer Message', 'woo-quickpay' ),57 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 58 58 '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' ) 61 61 ], 62 62 'cardtypelock' => [ 63 'title' => __( 'Payment methods', 'woo-quickpay' ),63 'title' => esc_html__( 'Payment methods', 'woocommerce-quickpay' ), 64 64 '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' ), 66 66 'default' => 'creditcard', 67 67 ], 68 68 'quickpay_icons' => [ 69 'title' => __( 'Credit card icons', 'woo-quickpay' ),69 'title' => esc_html__( 'Credit card icons', 'woocommerce-quickpay' ), 70 70 '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' ), 72 72 'desc_tip' => true, 73 73 'class' => 'wc-enhanced-select', 74 74 'css' => 'width: 450px;', 75 75 'custom_attributes' => [ 76 'data-placeholder' => __( 'Select icons', 'woo-quickpay' )76 'data-placeholder' => esc_html__( 'Select icons', 'woocommerce-quickpay' ) 77 77 ], 78 78 'default' => '', -
woocommerce-quickpay/trunk/classes/instances/resurs.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Resurs payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Resurs payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/trunk/classes/instances/sofort.php
r3095043 r3395304 34 34 $this->form_fields = [ 35 35 'enabled' => [ 36 'title' => __( 'Enable', 'woo-quickpay' ),36 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 37 37 'type' => 'checkbox', 38 'label' => __( 'Enable Sofort payment', 'woo-quickpay' ),38 'label' => esc_html__( 'Enable Sofort payment', 'woocommerce-quickpay' ), 39 39 'default' => 'no' 40 40 ], 41 41 '_Shop_setup' => [ 42 42 'type' => 'title', 43 'title' => __( 'Shop setup', 'woo-quickpay' ),43 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 44 44 ], 45 45 'title' => [ 46 'title' => __( 'Title', 'woo-quickpay' ),46 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 47 47 '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' ) 50 50 ], 51 51 'description' => [ 52 'title' => __( 'Customer Message', 'woo-quickpay' ),52 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 53 53 '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' ) 56 56 ], 57 57 ]; -
woocommerce-quickpay/trunk/classes/instances/swish.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Swish payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Swish payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/trunk/classes/instances/trustly.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Trustly payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Trustly payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/trunk/classes/instances/viabill.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable ViaBill payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable ViaBill payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/trunk/classes/instances/vipps.php
r3095043 r3395304 33 33 $this->form_fields = [ 34 34 'enabled' => [ 35 'title' => __( 'Enable', 'woo-quickpay' ),35 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 36 36 'type' => 'checkbox', 37 'label' => __( 'Enable Vipps payment', 'woo-quickpay' ),37 'label' => esc_html__( 'Enable Vipps payment', 'woocommerce-quickpay' ), 38 38 'default' => 'no' 39 39 ], 40 40 '_Shop_setup' => [ 41 41 'type' => 'title', 42 'title' => __( 'Shop setup', 'woo-quickpay' ),42 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 43 43 ], 44 44 'title' => [ 45 'title' => __( 'Title', 'woo-quickpay' ),45 'title' => esc_html__( 'Title', 'woocommerce-quickpay' ), 46 46 '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' ) 49 49 ], 50 50 'description' => [ 51 'title' => __( 'Customer Message', 'woo-quickpay' ),51 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 52 52 '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' ) 55 55 ], 56 56 ]; -
woocommerce-quickpay/trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-action.php
r2924617 r3395304 34 34 */ 35 35 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' ) ); 38 39 } 39 40 -
woocommerce-quickpay/trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-manage-payment.php
r2924617 r3395304 9 9 public function execute(): void { 10 10 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'] ) ); 13 13 14 14 if ( ! woocommerce_quickpay_can_user_manage_payments( $param_action ) ) { … … 34 34 if ( method_exists( $payment, $param_action ) ) { 35 35 // 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(); 37 37 38 38 // Call the action method and parse the transaction id and order object … … 43 43 } // The action was not allowed. Throw an exception 44 44 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() ) ); 46 46 } 47 47 } catch ( QuickPay_Exception $e ) { -
woocommerce-quickpay/trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-ping.php
r2924617 r3395304 10 10 if ( ! empty( $_POST['api_key'] ) ) { 11 11 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']) ) ); 13 13 $api->get( '/payments?page_size=1' ); 14 14 wp_send_json_success(); -
woocommerce-quickpay/trunk/classes/modules/ajax/woocommerce-quickpay-admin-ajax-private-key.php
r2924617 r3395304 10 10 try { 11 11 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' ) ); 13 13 } 14 14 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' ) ); 17 19 } 18 20 19 $api_key = $_POST['api_key'];21 $api_key = sanitize_text_field( wp_unslash( $_POST['api_key'] ) ); 20 22 21 23 $api = new WC_QuickPay_API( $api_key ); -
woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-admin-orders-lists-table.php
r3079637 r3395304 40 40 public function filter_shop_order_posts_columns( $show_columns ): array { 41 41 $column_name = 'quickpay_transaction_info'; 42 $column_header = __( 'Payment', 'woo-quickpay' );42 $column_header = esc_html__( 'Payment', 'woocommerce-quickpay' ); 43 43 44 44 return WC_QuickPay_Helper::array_insert_after( 'shipping_address', $show_columns, $column_name, $column_header ); … … 80 80 'transaction_brand' => $brand, 81 81 '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(), 83 83 'transaction_is_test' => $transaction->is_test(), 84 84 'is_cached' => $transaction->is_loaded_from_cached(), … … 98 98 public function order_bulk_actions( array $actions ): array { 99 99 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' ); 102 102 } 103 103 … … 112 112 public function subscription_bulk_actions( array $actions ): array { 113 113 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' ); 115 115 } 116 116 … … 133 133 134 134 // Redirect client 135 wp_ redirect( $_SERVER['HTTP_REFERER']);135 wp_safe_redirect( wp_unslash($_SERVER['HTTP_REFERER'] ?? $redirect_to) ); 136 136 exit; 137 137 } … … 149 149 150 150 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) ); 155 156 exit; 156 157 } … … 180 181 181 182 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) ); 186 188 exit; 187 189 } -
woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-admin-orders-meta.php
r2924617 r3395304 28 28 if ( WC_QuickPay_Requests_Utils::is_current_admin_screen( $screen_orders, $screen_subs ) ) { 29 29 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' ); 32 32 } 33 33 } … … 125 125 $state = $transaction->get_state(); 126 126 try { 127 $status = $transaction->get_current_type() . ' (' . __( 'subscription', 'woo-quickpay' ) . ')';127 $status = $transaction->get_current_type() . ' (' . esc_html__( 'subscription', 'woocommerce-quickpay' ) . ')'; 128 128 } catch ( QuickPay_API_Exception $e ) { 129 129 if ( 'initial' !== $state ) { -
woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-admin-orders.php
r2932188 r3395304 35 35 // By default, we will skip payment link creation if the order is paid already. 36 36 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' ); 38 39 39 40 return; … … 51 52 52 53 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' ) ); 54 55 } 55 56 $resource_order = wc_get_order( $order_parent_id ); … … 103 104 // Check URL 104 105 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() ) ); 106 108 } 107 109 … … 118 120 // Make sure to save the changes to the order/subscription object 119 121 $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 ); 121 124 122 125 do_action( 'woocommerce_quickpay_order_action_payment_link_created', $link->url, $order ); … … 124 127 return true; 125 128 } 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' ); 127 131 128 132 return false; … … 153 157 */ 154 158 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' ); 156 160 157 161 return $actions; -
woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-orders.php
r2924617 r3395304 27 27 if ( $transaction->is_action_allowed( 'cancel' ) ) { 28 28 $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' ) ); 30 30 } 31 31 } catch ( Exception $e ) { … … 55 55 56 56 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' ) ); 58 58 } 59 59 } -
woocommerce-quickpay/trunk/classes/modules/woocommerce-quickpay-subscriptions-change-payment-method.php
r2924617 r3395304 20 20 public function maybe_apply_description_notice( ?string $description, string $gateway_id ): ?string { 21 21 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 ); 23 27 } 24 28 -
woocommerce-quickpay/trunk/classes/updates/woocommerce-quickpay-update-4.6.php
r2924617 r3395304 51 51 } 52 52 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 ) ); 54 54 } 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() ) ); 56 56 } 57 57 } -
woocommerce-quickpay/trunk/classes/utils/woocommerce-quickpay-order-payments-utils.php
r3250888 r3395304 64 64 $fee = new WC_Order_Item_Fee(); 65 65 66 $fee->set_name( __( 'Payment Fee', 'woo -quickpay' ) );66 $fee->set_name( __( 'Payment Fee', 'woocommerce-quickpay' ) ); 67 67 $fee->set_total( $fee_in_cents / 100 ); 68 68 $fee->set_tax_status( 'none' ); -
woocommerce-quickpay/trunk/classes/utils/woocommerce-quickpay-order-transaction-data-utils.php
r3250888 r3395304 109 109 // Single: Order Email 110 110 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(); 112 112 } 113 113 114 114 // Single: Order Phone 115 115 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(); 117 117 } 118 118 119 119 // Single: Browser User Agent 120 120 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(); 122 122 } 123 123 124 124 // Single: Shipping Method 125 125 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(); 127 127 } 128 128 -
woocommerce-quickpay/trunk/classes/woocommerce-quickpay-callbacks.php
r3250888 r3395304 24 24 $order->set_transaction_id( $transaction->id ); 25 25 } 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() ) ); 27 27 } 28 28 WC_Pre_Orders_Order::mark_order_as_pre_ordered( $order ); … … 38 38 39 39 // 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 ) ); 41 42 42 43 // Fallback to save transaction IDs since this has seemed to sometimes fail when using WC_Order::payment_complete … … 53 54 */ 54 55 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' ); 56 57 57 58 $complete = WC_QuickPay_Helper::option_is_enabled( WC_QP()->s( 'quickpay_complete_on_capture' ) ) && ! $order->has_status( 'completed' ); … … 87 88 // Allow 3rd party code to overwrite the note 88 89 $transition_status_note = apply_filters( 'woocommerce_quickpay_payment_cancelled_order_transition_status_note', 89 __( 'Payment cancelled.', 'woo -quickpay' ),90 __( 'Payment cancelled.', 'woocommerce-quickpay' ), 90 91 $order, 91 92 $transaction, … … 112 113 */ 113 114 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 ) ); 115 117 // Activate the subscription 116 118 … … 197 199 198 200 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'] ) ) ) ); 200 202 } 201 203 … … 221 223 222 224 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'] ) ) ) ); 224 226 } 225 227 -
woocommerce-quickpay/trunk/classes/woocommerce-quickpay-exceptions.php
r3095043 r3395304 68 68 */ 69 69 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' ), 74 73 $this->log->get_domain() 75 ) ;74 )); 76 75 } 77 76 } -
woocommerce-quickpay/trunk/classes/woocommerce-quickpay-helper.php
r3045559 r3395304 124 124 wp_enqueue_script( 'quickpay-backend', plugins_url( '/assets/javascript/backend.js', __DIR__ ), [ 'jquery' ], self::static_version() ); 125 125 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' ), 127 128 ] ); 128 129 } … … 136 137 */ 137 138 protected static function maybe_enqueue_admin_statics(): bool { 138 global $post;139 139 /** 140 140 * Enqueue on the settings page for the gateways 141 141 */ 142 142 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() ) ) ) { 144 144 return true; 145 145 } … … 177 177 */ 178 178 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/' ); 180 180 } 181 181 … … 324 324 */ 325 325 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'; 327 327 } 328 328 … … 369 369 } 370 370 371 $u_agent = $_SERVER['HTTP_USER_AGENT'];371 $u_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); 372 372 $name = 'Unknown'; 373 373 -
woocommerce-quickpay/trunk/classes/woocommerce-quickpay-install.php
r2459034 r3395304 142 142 */ 143 143 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; 145 145 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' ) ] ); 148 148 exit; 149 149 } … … 151 151 self::update(); 152 152 153 echo json_encode( [ 'status' => 'success' ] );153 echo wp_json_encode( [ 'status' => 'success' ] ); 154 154 155 155 exit; -
woocommerce-quickpay/trunk/classes/woocommerce-quickpay-log.php
r3076215 r3395304 61 61 62 62 if ( is_array( $param ) ) { 63 $message .= print_r( $param, true);63 $message .= wp_json_encode( $param, JSON_PRETTY_PRINT ); 64 64 } 65 65 … … 110 110 */ 111 111 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', '>=' ) ) { 114 114 $args = [ 115 'page' => 'wc-status',116 'tab' => 'logs',115 'page' => 'wc-status', 116 'tab' => 'logs', 117 117 'source' => $this->_domain 118 118 ]; -
woocommerce-quickpay/trunk/classes/woocommerce-quickpay-settings.php
r3394934 r3395304 24 24 [ 25 25 'enabled' => [ 26 'title' => __( 'Enable', 'woo-quickpay' ),26 'title' => esc_html__( 'Enable', 'woocommerce-quickpay' ), 27 27 'type' => 'checkbox', 28 'label' => __( 'Enable Quickpay Payment', 'woo-quickpay' ),28 'label' => esc_html__( 'Enable Quickpay Payment', 'woocommerce-quickpay' ), 29 29 'default' => 'yes' 30 30 ], … … 32 32 '_Account_setup' => [ 33 33 'type' => 'title', 34 'title' => __( 'API - Integration', 'woo-quickpay' ),34 'title' => esc_html__( 'API - Integration', 'woocommerce-quickpay' ), 35 35 ], 36 36 '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' ), 40 40 'desc_tip' => true, 41 41 ], 42 42 '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' ), 46 46 'desc_tip' => true, 47 47 ], 48 48 '_Autocapture' => [ 49 49 'type' => 'title', 50 'title' => __( 'Autocapture settings', 'woo-quickpay' )50 'title' => esc_html__( 'Autocapture settings', 'woocommerce-quickpay' ) 51 51 ], 52 52 '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' ), 57 57 'default' => 'no', 58 58 'desc_tip' => false, 59 59 ], 60 60 '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' ), 65 65 'default' => 'no', 66 66 'desc_tip' => false, … … 68 68 '_caching' => [ 69 69 'type' => 'title', 70 'title' => __( 'Transaction Cache', 'woo-quickpay' )70 'title' => esc_html__( 'Transaction Cache', 'woocommerce-quickpay' ) 71 71 ], 72 72 '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' => [] ] ), 76 76 'default' => 'yes', 77 77 'desc_tip' => false, 78 78 ], 79 79 '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' ), 82 82 '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' ), 84 84 'default' => 7 * DAY_IN_SECONDS, 85 85 'desc_tip' => false, … … 88 88 '_Extra_gateway_settings' => [ 89 89 'type' => 'title', 90 'title' => __( 'Extra gateway settings', 'woo-quickpay' )90 'title' => esc_html__( 'Extra gateway settings', 'woocommerce-quickpay' ) 91 91 ], 92 92 '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' ), 96 96 'default' => 'creditcard', 97 97 ], 98 98 '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' ), 102 102 'default' => '', 103 103 'desc_tip' => true, … … 105 105 106 106 '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' ), 111 111 'default' => 'no', 112 112 'desc_tip' => true, 113 113 ], 114 114 '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' ), 127 127 'default' => 'no', 128 128 ], 129 129 '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' ), 131 131 'type' => 'select', 132 132 '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' ), 135 135 'default' => 'no', 136 136 ], 137 137 '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' ), 142 142 'default' => 'no', 143 143 ], 144 144 'quickpay_text_on_statement' => [ 145 'title' => __( 'Text on statement', 'woo-quickpay' ),145 'title' => esc_html__( 'Text on statement', 'woocommerce-quickpay' ), 146 146 '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' ), 148 148 'default' => '', 149 149 'desc_tip' => false, … … 156 156 '_Shop_setup' => [ 157 157 'type' => 'title', 158 'title' => __( 'Shop setup', 'woo-quickpay' ),158 'title' => esc_html__( 'Shop setup', 'woocommerce-quickpay' ), 159 159 ], 160 160 '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' ), 165 165 'desc_tip' => true, 166 166 ], 167 167 'description' => [ 168 'title' => __( 'Customer Message', 'woo-quickpay' ),168 'title' => esc_html__( 'Customer Message', 'woocommerce-quickpay' ), 169 169 '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' ), 172 172 'desc_tip' => true, 173 173 ], 174 174 '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' ), 179 179 'desc_tip' => true, 180 180 ], 181 181 'instructions' => [ 182 'title' => __( 'Email instructions', 'woo-quickpay' ),182 'title' => esc_html__( 'Email instructions', 'woocommerce-quickpay' ), 183 183 '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' ), 185 185 'default' => '', 186 186 'desc_tip' => true, 187 187 ], 188 188 'quickpay_icons' => [ 189 'title' => __( 'Credit card icons', 'woo-quickpay' ),189 'title' => esc_html__( 'Credit card icons', 'woocommerce-quickpay' ), 190 190 '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' ), 192 192 'desc_tip' => true, 193 193 'class' => 'wc-enhanced-select', 194 194 'css' => 'width: 450px;', 195 195 'custom_attributes' => [ 196 'data-placeholder' => __( 'Select icons', 'woo-quickpay' )196 'data-placeholder' => esc_html__( 'Select icons', 'woocommerce-quickpay' ) 197 197 ], 198 198 'default' => '', … … 200 200 ], 201 201 'quickpay_icons_maxheight' => [ 202 'title' => __( 'Credit card icons maximum height', 'woo-quickpay' ),202 'title' => esc_html__( 'Credit card icons maximum height', 'woocommerce-quickpay' ), 203 203 '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' ), 205 205 'default' => 20, 206 206 'desc_tip' => true, … … 208 208 'Google Analytics' => [ 209 209 'type' => 'title', 210 'title' => __( 'Google Analytics', 'woo-quickpay' ),210 'title' => esc_html__( 'Google Analytics', 'woocommerce-quickpay' ), 211 211 ], 212 212 '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' ), 216 216 'default' => '', 217 217 'desc_tip' => true, … … 219 219 'ShopAdminSetup' => [ 220 220 'type' => 'title', 221 'title' => __( 'Shop Admin Setup', 'woo-quickpay' ),221 'title' => esc_html__( 'Shop Admin Setup', 'woocommerce-quickpay' ), 222 222 ], 223 223 224 224 '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' ), 229 229 'default' => 'yes', 230 230 'desc_tip' => false, … … 233 233 'CustomVariables' => [ 234 234 'type' => 'title', 235 'title' => __( 'Custom Variables', 'woo-quickpay' ),235 'title' => esc_html__( 'Custom Variables', 'woocommerce-quickpay' ), 236 236 ], 237 237 'quickpay_custom_variables' => [ 238 'title' => __( 'Select Information', 'woo-quickpay' ),238 'title' => esc_html__( 'Select Information', 'woocommerce-quickpay' ), 239 239 'type' => 'multiselect', 240 240 'class' => 'wc-enhanced-select', 241 241 'css' => 'width: 450px;', 242 242 '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' ), 244 244 'options' => self::custom_variable_options(), 245 245 'desc_tip' => true, 246 246 'custom_attributes' => [ 247 'data-placeholder' => __( 'Select order data', 'woo-quickpay' )247 'data-placeholder' => esc_html__( 'Select order data', 'woocommerce-quickpay' ) 248 248 ] 249 249 ], … … 257 257 258 258 $fields['subscription_autocomplete_renewal_orders'] = [ 259 'title' => __( 'Complete renewal orders', 'woo-quickpay' ),259 'title' => esc_html__( 'Complete renewal orders', 'woocommerce-quickpay' ), 260 260 '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' ), 263 263 'default' => 'no', 264 264 'desc_tip' => true, … … 267 267 // Creates a subscription transaction on renewal orders and automatically captures payment for it afterwards on callback 268 268 $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' ), 270 270 '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' ), 273 273 'default' => 'no', 274 274 'desc_tip' => true, … … 298 298 ], $statuses ); 299 299 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 ); 303 303 } 304 304 … … 351 351 private static function custom_variable_options() { 352 352 $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' ), 359 359 ]; 360 360 … … 370 370 */ 371 371 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' ) ); 375 375 376 376 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' ) ); 378 378 } 379 379 380 380 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' ) ); 382 382 } 383 383 384 384 $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' ) ); 386 386 387 387 return $html; … … 406 406 407 407 $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' ) 410 410 ]; 411 411 … … 417 417 418 418 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() ) ) ); 421 422 $message .= '<ul>'; 422 423 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>"; 424 425 } 425 426 $message .= '</ul>'; 426 427 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 ) ); 428 429 } 429 430 … … 447 448 448 449 return empty( $_POST[ $post_key ] ) && empty( $setting_key ); 449 450 450 } 451 451 -
woocommerce-quickpay/trunk/helpers/notices.php
r3095043 r3395304 110 110 array_walk( $notices, 'esc_html' ); 111 111 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') ); 113 113 echo '<p>' . wp_kses_post( implode( "</p>\n<p>", $notices ) ) . '</p>'; 114 114 echo '</div>'; -
woocommerce-quickpay/trunk/helpers/requests.php
r2924617 r3395304 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 3 2 4 /** 3 5 * Ensure that payments.quickpay.net is a trusted redirect host -
woocommerce-quickpay/trunk/helpers/transactions.php
r3250888 r3395304 67 67 68 68 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' ) ); 70 70 } 71 71 -
woocommerce-quickpay/trunk/templates/admin/meta-box-order.php
r2924617 r3395304 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } // Exit if accessed directly 5 2 6 /** 3 7 * @var WC_QuickPay_API_Transaction $transaction … … 9 13 * @var string $transaction_brand 10 14 */ 15 11 16 ?> 12 17 <?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> 16 21 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 ?> 27 34 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"> 31 38 <span class='qp-balance__currency'> 32 <?php echo $transaction->get_currency() ?>39 <?php echo esc_html( $transaction->get_currency() ) ?> 33 40 </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> 36 43 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"> 39 46 <span class="qp-balance__label"> 40 <?php _e( 'Capture amount', 'woo-quickpay' ) ?>:47 <?php esc_html_e( 'Capture amount', 'woocommerce-quickpay' ) ?>: 41 48 </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> 44 51 <input id='qp-balance__amount-field' type='text' value='<?php echo esc_attr( $transaction->get_formatted_remaining_balance() ) ?> '/> 45 52 </span> 46 </li>53 </li> 47 54 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 ?> 54 61 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"> 69 76 <img src="<?php echo esc_attr( $brand_image_url ) ?>" alt="<?php echo esc_attr( $transaction_brand ) ?>"/> 70 77 </span> 71 <?php endif ?>72 </small>73 </p>78 <?php endif ?> 79 </small> 80 </p> 74 81 <?php endif ?> 75 82 76 83 <?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> 82 89 <?php endif ?> 83 90 84 91 <?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> 90 97 <?php endif ?> 91 98 92 99 <?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> 99 106 <?php endif ?> -
woocommerce-quickpay/trunk/templates/admin/meta-box-subscription.php
r2924617 r3395304 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 3 2 4 /** 3 5 * @var string $transaction_status … … 9 11 <p class="woocommerce-quickpay-<?php echo esc_attr( $transaction_status ) ?>"> 10 12 <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) ?> 12 14 </strong> 13 15 </p> … … 17 19 <p> 18 20 <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) ?> 20 22 <span class="qp-meta-card"> 21 23 <img src="<?php echo esc_attr( WC_Quickpay_Helper::get_payment_type_logo( $transaction_brand ) ) ?>" … … 29 31 <p> 30 32 <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) ?> 32 34 </small> 33 35 </p> -
woocommerce-quickpay/trunk/templates/woocommerce/emails/customer-quickpay-payment-link.php
r2100188 r3395304 25 25 26 26 <?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> 28 28 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> 30 30 31 31 <?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> 33 33 <?php 34 34 … … 54 54 ?> 55 55 <p> 56 <?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce ' ); ?>56 <?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce-quickpay' ); ?> 57 57 </p> 58 58 <?php -
woocommerce-quickpay/trunk/templates/woocommerce/emails/plain/customer-quickpay-payment-link.php
r2100188 r3395304 23 23 24 24 /* translators: %s: Customer first name */ 25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce ' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce-quickpay' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n"; 26 26 27 echo esc_html__( 'Thank you for your order.', 'woo -quickpay' ) . "\n\n";27 echo esc_html__( 'Thank you for your order.', 'woocommerce-quickpay' ) . "\n\n"; 28 28 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 */ 30 echo esc_html(sprintf(__( 'Use the following link to pay and complete your order: %s', 'woocommerce-quickpay' ). $payment_link)). "\n\n"; 30 31 31 32 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n"; … … 52 53 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); 53 54 54 echo esc_html__( 'Thanks for shopping with us.', 'woocommerce ' ) . "\n\n";55 echo esc_html__( 'Thanks for shopping with us.', 'woocommerce-quickpay' ) . "\n\n"; 55 56 56 57 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n"; -
woocommerce-quickpay/trunk/views/html-notice-update.php
r3394934 r3395304 10 10 ?> 11 11 <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> 15 15 </div> 16 16 <script type="text/javascript"> 17 17 (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:line18 $('.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 20 20 21 21 if (confirm) { … … 24 24 message.find('p').fadeOut(); 25 25 26 $.post('<?php echo admin_url('admin-ajax.php'); ?>', {26 $.post('<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>', { 27 27 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() ); ?>' 29 29 }, 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' ); ?>")); 31 31 }); 32 32 } -
woocommerce-quickpay/trunk/views/html-notice-upgrading.php
r3394934 r3395304 10 10 ?> 11 11 <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> 15 14 </div> -
woocommerce-quickpay/trunk/views/html-order-table-transaction-data.php
r2100188 r3395304 1 <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> 2 1 3 <div class="woocommerce-quickpay-order-transaction-data"> 2 4 <table border="0" cellpadding="0" cellspacing="0" class="meta"> 3 5 <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> 6 8 </tr> 7 9 <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> 10 12 </tr> 11 13 <tr> 12 <td><?php _e('Method', 'woo-quickpay' ) ?>:</td>14 <td><?php esc_html_e('Method', 'woocommerce-quickpay' ) ?>:</td> 13 15 <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> 15 17 </td> 16 18 </tr> … … 18 20 <div class="tags"> 19 21 <?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> 22 24 <?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) ?> 25 27 </span> 26 28 <?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> 29 31 <?php endif; ?> 30 32 -
woocommerce-quickpay/trunk/woocommerce-quickpay.php
r3394934 r3395304 4 4 * Plugin URI: http://wordpress.org/plugins/woocommerce-quickpay/ 5 5 * Description: Integrates your Quickpay payment gateway into your WooCommerce installation. 6 * Version: 7. 4.06 * Version: 7.5.0 7 7 * Author: Perfect Solution 8 * Text Domain: woo -quickpay8 * Text Domain: woocommerce-quickpay 9 9 * Domain Path: /languages/ 10 10 * Author URI: http://perfect-solution.dk 11 11 * Wiki: http://quickpay.perfect-solution.dk/ 12 12 * 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 14 16 * Requires Plugins: woocommerce 15 17 */ … … 20 22 } 21 23 22 define( 'WCQP_VERSION', '7. 4.0' );24 define( 'WCQP_VERSION', '7.5.0' ); 23 25 define( 'WCQP_URL', plugins_url( __FILE__ ) ); 24 26 define( 'WCQP_PATH', plugin_dir_path( __FILE__ ) ); … … 31 33 function wc_quickpay_woocommerce_inactive_notice() { 32 34 $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 ) ); 36 38 } 37 39 … … 333 335 public static function add_action_links( $links ) { 334 336 $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>', 336 338 ], $links ); 337 339 … … 404 406 public function payment_fields(): void { 405 407 if ( $description = $this->get_description() ) { 406 echo wp autop( wptexturize( $description) );408 echo wp_kses_post( wpautop( wptexturize( $description ) ) ); 407 409 } 408 410 } … … 527 529 // Check if there is a transaction ID 528 530 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 ) ); 530 533 } 531 534 … … 537 540 if ( ! $payment->is_action_allowed( 'refund' ) ) { 538 541 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' ) ); 540 543 } 541 544 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' ) ); 543 546 } 544 547 … … 665 668 '_quickpay_transaction_id' => [ 666 669 'value' => WC_QuickPay_Order_Utils::get_transaction_id( $subscription ), 667 'label' => __( 'QuickPay Transaction ID', 'woo -quickpay' ),670 'label' => __( 'QuickPay Transaction ID', 'woocommerce-quickpay' ), 668 671 ], 669 672 ], … … 693 696 694 697 // 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 ); 696 700 } 697 701 } … … 750 754 // Redirect the customer to account page if the current order is failed 751 755 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 ); 753 763 754 764 wc_add_notice( $payment_failure_text, 'error' ); 755 765 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' ); 762 772 } 763 773 … … 824 834 825 835 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 ) ); 827 838 break; 828 839 … … 871 882 } 872 883 } 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 ) ); 874 886 } 875 887 } catch ( JsonException $e ) { … … 910 922 public function generate_settings_html( $form_fields = array(), $echo = true ) { 911 923 $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>"; 913 926 $html .= WC_QuickPay_Settings::clear_logs_section(); 914 927 … … 924 937 925 938 if ( $echo ) { 926 echo $html; // WPCS: XSS ok.939 echo wp_kses_post( $html ); // WPCS: XSS ok. 927 940 } else { 928 941 return $html; … … 947 960 948 961 if ( $this->instructions ) { 949 echo wp autop( wptexturize( $this->instructions) );962 echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) ); 950 963 } 951 964 }
Note: See TracChangeset
for help on using the changeset viewer.