PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.17
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.17
1.10.25 1.10.24 1.10.23 1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 All 169 releases
← All changes | includes/Services/Settings/Payment_Gateways_Section.php +2 -14 1.10.22 → 1.10.17 View file →
@@ -7,9 +7,8 @@
7 7
8 8 namespace WCPOS\WooCommercePOS\Services\Settings;
9 9
10 10 use WC_Payment_Gateways;
11 -use WCPOS\WooCommercePOS\Payments\Gateway_Contract;
12 11
13 12 /**
14 13 * The Payment Gateways Settings Section.
15 14 *
@@ -106,10 +105,8 @@
106 105
107 106 // Gateways that represent deferred/unverified payment default to on-hold.
108 107 $on_hold_gateways = array( 'bacs', 'cheque' );
109 108
110 - $contract = new Gateway_Contract();
111 -
112 109 // loop through installed gateways and merge with saved settings.
113 110 foreach ( $installed_gateways as $id => $gateway ) {
114 111 // sanity check for gateway class.
115 112 if ( ! is_a( $gateway, 'WC_Payment_Gateway' ) || 'pre_install_woocommerce_payments_promotion' === $id ) {
@@ -120,10 +117,10 @@
120 117
121 118 $response['gateways'][ $id ] = array_replace_recursive(
122 119 array(
123 120 'id' => $gateway->id,
124 - 'title' => $contract->get_display_title( $gateway ),
125 - 'description' => $contract->get_display_description( $gateway ),
121 + 'title' => $gateway->title,
122 + 'description' => $gateway->description,
126 123 'enabled' => false,
127 124 'order' => 999,
128 125 'order_status' => $default_status,
129 126 ),
@@ -128,17 +125,8 @@
128 125 'order_status' => $default_status,
129 126 ),
130 127 $gateways_settings['gateways'][ $id ] ?? array()
131 128 );
132 -
133 - if ( ! is_string( $response['gateways'][ $id ]['title'] ) || '' === trim( $response['gateways'][ $id ]['title'] ) ) {
134 - $response['gateways'][ $id ]['title'] = $contract->get_display_title( $gateway );
135 - }
136 -
137 - // A saved empty string is a deliberate blank and is kept.
138 - if ( ! is_string( $response['gateways'][ $id ]['description'] ) ) {
139 - $response['gateways'][ $id ]['description'] = $contract->get_display_description( $gateway );
140 - }
141 129 }
142 130
143 131 /**
144 132 * Filters the payment gateways settings.