@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
2 | +if ( ! defined('ABSPATH')) { |
|
3 | 3 | exit; |
4 | 4 | } |
5 | 5 | |
@@ -7,40 +7,40 @@ discard block |
||
7 | 7 | 'wc_stripe_ideal_settings', |
8 | 8 | array( |
9 | 9 | 'geo_target' => array( |
10 | - 'description' => __( 'Customer Geography: The Netherlands', 'woocommerce-gateway-stripe' ), |
|
10 | + 'description' => __('Customer Geography: The Netherlands', 'woocommerce-gateway-stripe'), |
|
11 | 11 | 'type' => 'title', |
12 | 12 | ), |
13 | 13 | 'guide' => array( |
14 | - 'description' => __( '<a href="https://stripe.com/payments/payment-methods-guide#ideal" target="_blank">Payment Method Guide</a>', 'woocommerce-gateway-stripe' ), |
|
14 | + 'description' => __('<a href="https://stripe.com/payments/payment-methods-guide#ideal" target="_blank">Payment Method Guide</a>', 'woocommerce-gateway-stripe'), |
|
15 | 15 | 'type' => 'title', |
16 | 16 | ), |
17 | 17 | 'activation' => array( |
18 | - 'description' => __( 'Must be activated from your Stripe Dashboard Settings <a href="https://dashboard.stripe.com/account/payments/settings" target="_blank">here</a>', 'woocommerce-gateway-stripe' ), |
|
18 | + 'description' => __('Must be activated from your Stripe Dashboard Settings <a href="https://dashboard.stripe.com/account/payments/settings" target="_blank">here</a>', 'woocommerce-gateway-stripe'), |
|
19 | 19 | 'type' => 'title', |
20 | 20 | ), |
21 | 21 | 'enabled' => array( |
22 | - 'title' => __( 'Enable/Disable', 'woocommerce-gateway-stripe' ), |
|
23 | - 'label' => __( 'Enable Stripe iDeal', 'woocommerce-gateway-stripe' ), |
|
22 | + 'title' => __('Enable/Disable', 'woocommerce-gateway-stripe'), |
|
23 | + 'label' => __('Enable Stripe iDeal', 'woocommerce-gateway-stripe'), |
|
24 | 24 | 'type' => 'checkbox', |
25 | 25 | 'description' => '', |
26 | 26 | 'default' => 'no', |
27 | 27 | ), |
28 | 28 | 'title' => array( |
29 | - 'title' => __( 'Title', 'woocommerce-gateway-stripe' ), |
|
29 | + 'title' => __('Title', 'woocommerce-gateway-stripe'), |
|
30 | 30 | 'type' => 'text', |
31 | - 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-gateway-stripe' ), |
|
32 | - 'default' => __( 'iDeal', 'woocommerce-gateway-stripe' ), |
|
31 | + 'description' => __('This controls the title which the user sees during checkout.', 'woocommerce-gateway-stripe'), |
|
32 | + 'default' => __('iDeal', 'woocommerce-gateway-stripe'), |
|
33 | 33 | 'desc_tip' => true, |
34 | 34 | ), |
35 | 35 | 'description' => array( |
36 | - 'title' => __( 'Description', 'woocommerce-gateway-stripe' ), |
|
36 | + 'title' => __('Description', 'woocommerce-gateway-stripe'), |
|
37 | 37 | 'type' => 'text', |
38 | - 'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce-gateway-stripe' ), |
|
39 | - 'default' => __( 'You will be redirected to iDeal.', 'woocommerce-gateway-stripe' ), |
|
38 | + 'description' => __('This controls the description which the user sees during checkout.', 'woocommerce-gateway-stripe'), |
|
39 | + 'default' => __('You will be redirected to iDeal.', 'woocommerce-gateway-stripe'), |
|
40 | 40 | 'desc_tip' => true, |
41 | 41 | ), |
42 | 42 | 'webhook' => array( |
43 | - 'title' => __( 'Webhook Endpoints', 'woocommerce-gateway-stripe' ), |
|
43 | + 'title' => __('Webhook Endpoints', 'woocommerce-gateway-stripe'), |
|
44 | 44 | 'type' => 'title', |
45 | 45 | /* translators: webhook URL */ |
46 | 46 | 'description' => $this->display_admin_settings_webhook_description(), |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
2 | +if ( ! defined('ABSPATH')) { |
|
3 | 3 | exit; |
4 | 4 | } |
5 | 5 | |
@@ -7,36 +7,36 @@ discard block |
||
7 | 7 | 'wc_stripe_eps_settings', |
8 | 8 | array( |
9 | 9 | 'geo_target' => array( |
10 | - 'description' => __( 'Customer Geography: Austria', 'woocommerce-gateway-stripe' ), |
|
10 | + 'description' => __('Customer Geography: Austria', 'woocommerce-gateway-stripe'), |
|
11 | 11 | 'type' => 'title', |
12 | 12 | ), |
13 | 13 | 'activation' => array( |
14 | - 'description' => __( 'Must be activated from your Stripe Dashboard Settings <a href="https://dashboard.stripe.com/account/payments/settings" target="_blank">here</a>', 'woocommerce-gateway-stripe' ), |
|
14 | + 'description' => __('Must be activated from your Stripe Dashboard Settings <a href="https://dashboard.stripe.com/account/payments/settings" target="_blank">here</a>', 'woocommerce-gateway-stripe'), |
|
15 | 15 | 'type' => 'title', |
16 | 16 | ), |
17 | 17 | 'enabled' => array( |
18 | - 'title' => __( 'Enable/Disable', 'woocommerce-gateway-stripe' ), |
|
19 | - 'label' => __( 'Enable Stripe EPS', 'woocommerce-gateway-stripe' ), |
|
18 | + 'title' => __('Enable/Disable', 'woocommerce-gateway-stripe'), |
|
19 | + 'label' => __('Enable Stripe EPS', 'woocommerce-gateway-stripe'), |
|
20 | 20 | 'type' => 'checkbox', |
21 | 21 | 'description' => '', |
22 | 22 | 'default' => 'no', |
23 | 23 | ), |
24 | 24 | 'title' => array( |
25 | - 'title' => __( 'Title', 'woocommerce-gateway-stripe' ), |
|
25 | + 'title' => __('Title', 'woocommerce-gateway-stripe'), |
|
26 | 26 | 'type' => 'text', |
27 | - 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-gateway-stripe' ), |
|
28 | - 'default' => __( 'EPS', 'woocommerce-gateway-stripe' ), |
|
27 | + 'description' => __('This controls the title which the user sees during checkout.', 'woocommerce-gateway-stripe'), |
|
28 | + 'default' => __('EPS', 'woocommerce-gateway-stripe'), |
|
29 | 29 | 'desc_tip' => true, |
30 | 30 | ), |
31 | 31 | 'description' => array( |
32 | - 'title' => __( 'Description', 'woocommerce-gateway-stripe' ), |
|
32 | + 'title' => __('Description', 'woocommerce-gateway-stripe'), |
|
33 | 33 | 'type' => 'text', |
34 | - 'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce-gateway-stripe' ), |
|
35 | - 'default' => __( 'You will be redirected to EPS.', 'woocommerce-gateway-stripe' ), |
|
34 | + 'description' => __('This controls the description which the user sees during checkout.', 'woocommerce-gateway-stripe'), |
|
35 | + 'default' => __('You will be redirected to EPS.', 'woocommerce-gateway-stripe'), |
|
36 | 36 | 'desc_tip' => true, |
37 | 37 | ), |
38 | 38 | 'webhook' => array( |
39 | - 'title' => __( 'Webhook Endpoints', 'woocommerce-gateway-stripe' ), |
|
39 | + 'title' => __('Webhook Endpoints', 'woocommerce-gateway-stripe'), |
|
40 | 40 | 'type' => 'title', |
41 | 41 | /* translators: webhook URL */ |
42 | 42 | 'description' => $this->display_admin_settings_webhook_description(), |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
2 | +if ( ! defined('ABSPATH')) { |
|
3 | 3 | exit; |
4 | 4 | } |
5 | 5 | |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | * Constructor |
33 | 33 | * @param int $user_id The WP user ID |
34 | 34 | */ |
35 | - public function __construct( $user_id = 0 ) { |
|
36 | - if ( $user_id ) { |
|
37 | - $this->set_user_id( $user_id ); |
|
38 | - $this->set_id( $this->get_id_from_meta( $user_id ) ); |
|
35 | + public function __construct($user_id = 0) { |
|
36 | + if ($user_id) { |
|
37 | + $this->set_user_id($user_id); |
|
38 | + $this->set_id($this->get_id_from_meta($user_id)); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
@@ -51,15 +51,15 @@ discard block |
||
51 | 51 | * Set Stripe customer ID. |
52 | 52 | * @param [type] $id [description] |
53 | 53 | */ |
54 | - public function set_id( $id ) { |
|
54 | + public function set_id($id) { |
|
55 | 55 | // Backwards compat for customer ID stored in array format. (Pre 3.0) |
56 | - if ( is_array( $id ) && isset( $id['customer_id'] ) ) { |
|
56 | + if (is_array($id) && isset($id['customer_id'])) { |
|
57 | 57 | $id = $id['customer_id']; |
58 | 58 | |
59 | - $this->update_id_in_meta( $id ); |
|
59 | + $this->update_id_in_meta($id); |
|
60 | 60 | } |
61 | 61 | |
62 | - $this->id = wc_clean( $id ); |
|
62 | + $this->id = wc_clean($id); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -67,15 +67,15 @@ discard block |
||
67 | 67 | * @return int |
68 | 68 | */ |
69 | 69 | public function get_user_id() { |
70 | - return absint( $this->user_id ); |
|
70 | + return absint($this->user_id); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
74 | 74 | * Set User ID used by WordPress. |
75 | 75 | * @param int $user_id |
76 | 76 | */ |
77 | - public function set_user_id( $user_id ) { |
|
78 | - $this->user_id = absint( $user_id ); |
|
77 | + public function set_user_id($user_id) { |
|
78 | + $this->user_id = absint($user_id); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | * @return WP_User |
84 | 84 | */ |
85 | 85 | protected function get_user() { |
86 | - return $this->get_user_id() ? get_user_by( 'id', $this->get_user_id() ) : false; |
|
86 | + return $this->get_user_id() ? get_user_by('id', $this->get_user_id()) : false; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | 90 | * Store data from the Stripe API about this customer |
91 | 91 | */ |
92 | - public function set_customer_data( $data ) { |
|
92 | + public function set_customer_data($data) { |
|
93 | 93 | $this->customer_data = $data; |
94 | 94 | } |
95 | 95 | |
@@ -99,58 +99,58 @@ discard block |
||
99 | 99 | * @param array $args Additional arguments (optional). |
100 | 100 | * @return array |
101 | 101 | */ |
102 | - protected function generate_customer_request( $args = array() ) { |
|
103 | - $billing_email = isset( $_POST['billing_email'] ) ? filter_var( $_POST['billing_email'], FILTER_SANITIZE_EMAIL ) : ''; |
|
102 | + protected function generate_customer_request($args = array()) { |
|
103 | + $billing_email = isset($_POST['billing_email']) ? filter_var($_POST['billing_email'], FILTER_SANITIZE_EMAIL) : ''; |
|
104 | 104 | $user = $this->get_user(); |
105 | 105 | |
106 | - if ( $user ) { |
|
107 | - $billing_first_name = get_user_meta( $user->ID, 'billing_first_name', true ); |
|
108 | - $billing_last_name = get_user_meta( $user->ID, 'billing_last_name', true ); |
|
106 | + if ($user) { |
|
107 | + $billing_first_name = get_user_meta($user->ID, 'billing_first_name', true); |
|
108 | + $billing_last_name = get_user_meta($user->ID, 'billing_last_name', true); |
|
109 | 109 | |
110 | 110 | // If billing first name does not exists try the user first name. |
111 | - if ( empty( $billing_first_name ) ) { |
|
112 | - $billing_first_name = get_user_meta( $user->ID, 'first_name', true ); |
|
111 | + if (empty($billing_first_name)) { |
|
112 | + $billing_first_name = get_user_meta($user->ID, 'first_name', true); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | // If billing last name does not exists try the user last name. |
116 | - if ( empty( $billing_last_name ) ) { |
|
117 | - $billing_last_name = get_user_meta( $user->ID, 'last_name', true ); |
|
116 | + if (empty($billing_last_name)) { |
|
117 | + $billing_last_name = get_user_meta($user->ID, 'last_name', true); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | // translators: %1$s First name, %2$s Second name, %3$s Username. |
121 | - $description = sprintf( __( 'Name: %1$s %2$s, Username: %s', 'woocommerce-gateway-stripe' ), $billing_first_name, $billing_last_name, $user->user_login ); |
|
121 | + $description = sprintf(__('Name: %1$s %2$s, Username: %s', 'woocommerce-gateway-stripe'), $billing_first_name, $billing_last_name, $user->user_login); |
|
122 | 122 | |
123 | 123 | $defaults = array( |
124 | 124 | 'email' => $user->user_email, |
125 | 125 | 'description' => $description, |
126 | 126 | ); |
127 | 127 | |
128 | - $billing_full_name = trim( $billing_first_name . ' ' . $billing_last_name ); |
|
129 | - if ( ! empty( $billing_full_name ) ) { |
|
128 | + $billing_full_name = trim($billing_first_name . ' ' . $billing_last_name); |
|
129 | + if ( ! empty($billing_full_name)) { |
|
130 | 130 | $defaults['name'] = $billing_full_name; |
131 | 131 | } |
132 | 132 | } else { |
133 | - $billing_first_name = isset( $_POST['billing_first_name'] ) ? filter_var( wp_unslash( $_POST['billing_first_name'] ), FILTER_SANITIZE_STRING ) : ''; // phpcs:ignore WordPress.Security.NonceVerification |
|
134 | - $billing_last_name = isset( $_POST['billing_last_name'] ) ? filter_var( wp_unslash( $_POST['billing_last_name'] ), FILTER_SANITIZE_STRING ) : ''; // phpcs:ignore WordPress.Security.NonceVerification |
|
133 | + $billing_first_name = isset($_POST['billing_first_name']) ? filter_var(wp_unslash($_POST['billing_first_name']), FILTER_SANITIZE_STRING) : ''; // phpcs:ignore WordPress.Security.NonceVerification |
|
134 | + $billing_last_name = isset($_POST['billing_last_name']) ? filter_var(wp_unslash($_POST['billing_last_name']), FILTER_SANITIZE_STRING) : ''; // phpcs:ignore WordPress.Security.NonceVerification |
|
135 | 135 | |
136 | 136 | // translators: %1$s First name, %2$s Second name. |
137 | - $description = sprintf( __( 'Name: %1$s %2$s, Guest', 'woocommerce-gateway-stripe' ), $billing_first_name, $billing_last_name ); |
|
137 | + $description = sprintf(__('Name: %1$s %2$s, Guest', 'woocommerce-gateway-stripe'), $billing_first_name, $billing_last_name); |
|
138 | 138 | |
139 | 139 | $defaults = array( |
140 | 140 | 'email' => $billing_email, |
141 | 141 | 'description' => $description, |
142 | 142 | ); |
143 | 143 | |
144 | - $billing_full_name = trim( $billing_first_name . ' ' . $billing_last_name ); |
|
145 | - if ( ! empty( $billing_full_name ) ) { |
|
144 | + $billing_full_name = trim($billing_first_name . ' ' . $billing_last_name); |
|
145 | + if ( ! empty($billing_full_name)) { |
|
146 | 146 | $defaults['name'] = $billing_full_name; |
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
150 | 150 | $metadata = array(); |
151 | - $defaults['metadata'] = apply_filters( 'wc_stripe_customer_metadata', $metadata, $user ); |
|
151 | + $defaults['metadata'] = apply_filters('wc_stripe_customer_metadata', $metadata, $user); |
|
152 | 152 | |
153 | - return wp_parse_args( $args, $defaults ); |
|
153 | + return wp_parse_args($args, $defaults); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
@@ -158,23 +158,23 @@ discard block |
||
158 | 158 | * @param array $args |
159 | 159 | * @return WP_Error|int |
160 | 160 | */ |
161 | - public function create_customer( $args = array() ) { |
|
162 | - $args = $this->generate_customer_request( $args ); |
|
163 | - $response = WC_Stripe_API::request( apply_filters( 'wc_stripe_create_customer_args', $args ), 'customers' ); |
|
161 | + public function create_customer($args = array()) { |
|
162 | + $args = $this->generate_customer_request($args); |
|
163 | + $response = WC_Stripe_API::request(apply_filters('wc_stripe_create_customer_args', $args), 'customers'); |
|
164 | 164 | |
165 | - if ( ! empty( $response->error ) ) { |
|
166 | - throw new WC_Stripe_Exception( print_r( $response, true ), $response->error->message ); |
|
165 | + if ( ! empty($response->error)) { |
|
166 | + throw new WC_Stripe_Exception(print_r($response, true), $response->error->message); |
|
167 | 167 | } |
168 | 168 | |
169 | - $this->set_id( $response->id ); |
|
169 | + $this->set_id($response->id); |
|
170 | 170 | $this->clear_cache(); |
171 | - $this->set_customer_data( $response ); |
|
171 | + $this->set_customer_data($response); |
|
172 | 172 | |
173 | - if ( $this->get_user_id() ) { |
|
174 | - $this->update_id_in_meta( $response->id ); |
|
173 | + if ($this->get_user_id()) { |
|
174 | + $this->update_id_in_meta($response->id); |
|
175 | 175 | } |
176 | 176 | |
177 | - do_action( 'woocommerce_stripe_add_customer', $args, $response ); |
|
177 | + do_action('woocommerce_stripe_add_customer', $args, $response); |
|
178 | 178 | |
179 | 179 | return $response->id; |
180 | 180 | } |
@@ -189,30 +189,30 @@ discard block |
||
189 | 189 | * |
190 | 190 | * @throws WC_Stripe_Exception |
191 | 191 | */ |
192 | - public function update_customer( $args = array(), $is_retry = false ) { |
|
193 | - if ( empty( $this->get_id() ) ) { |
|
194 | - throw new WC_Stripe_Exception( 'id_required_to_update_user', __( 'Attempting to update a Stripe customer without a customer ID.', 'woocommerce-gateway-stripe' ) ); |
|
192 | + public function update_customer($args = array(), $is_retry = false) { |
|
193 | + if (empty($this->get_id())) { |
|
194 | + throw new WC_Stripe_Exception('id_required_to_update_user', __('Attempting to update a Stripe customer without a customer ID.', 'woocommerce-gateway-stripe')); |
|
195 | 195 | } |
196 | 196 | |
197 | - $args = $this->generate_customer_request( $args ); |
|
198 | - $args = apply_filters( 'wc_stripe_update_customer_args', $args ); |
|
199 | - $response = WC_Stripe_API::request( $args, 'customers/' . $this->get_id() ); |
|
197 | + $args = $this->generate_customer_request($args); |
|
198 | + $args = apply_filters('wc_stripe_update_customer_args', $args); |
|
199 | + $response = WC_Stripe_API::request($args, 'customers/' . $this->get_id()); |
|
200 | 200 | |
201 | - if ( ! empty( $response->error ) ) { |
|
202 | - if ( $this->is_no_such_customer_error( $response->error ) && ! $is_retry ) { |
|
201 | + if ( ! empty($response->error)) { |
|
202 | + if ($this->is_no_such_customer_error($response->error) && ! $is_retry) { |
|
203 | 203 | // This can happen when switching the main Stripe account or importing users from another site. |
204 | 204 | // If not already retrying, recreate the customer and then try updating it again. |
205 | 205 | $this->recreate_customer(); |
206 | - return $this->update_customer( $args, true ); |
|
206 | + return $this->update_customer($args, true); |
|
207 | 207 | } |
208 | 208 | |
209 | - throw new WC_Stripe_Exception( print_r( $response, true ), $response->error->message ); |
|
209 | + throw new WC_Stripe_Exception(print_r($response, true), $response->error->message); |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | $this->clear_cache(); |
213 | - $this->set_customer_data( $response ); |
|
213 | + $this->set_customer_data($response); |
|
214 | 214 | |
215 | - do_action( 'woocommerce_stripe_update_customer', $args, $response ); |
|
215 | + do_action('woocommerce_stripe_update_customer', $args, $response); |
|
216 | 216 | |
217 | 217 | return $this->get_id(); |
218 | 218 | } |
@@ -224,11 +224,11 @@ discard block |
||
224 | 224 | * @since 4.1.2 |
225 | 225 | * @param array $error |
226 | 226 | */ |
227 | - public function is_no_such_customer_error( $error ) { |
|
227 | + public function is_no_such_customer_error($error) { |
|
228 | 228 | return ( |
229 | 229 | $error && |
230 | 230 | 'invalid_request_error' === $error->type && |
231 | - preg_match( '/No such customer/i', $error->message ) |
|
231 | + preg_match('/No such customer/i', $error->message) |
|
232 | 232 | ); |
233 | 233 | } |
234 | 234 | |
@@ -237,9 +237,9 @@ discard block |
||
237 | 237 | * @param string $source_id |
238 | 238 | * @return WP_Error|int |
239 | 239 | */ |
240 | - public function add_source( $source_id ) { |
|
241 | - if ( ! $this->get_id() ) { |
|
242 | - $this->set_id( $this->create_customer() ); |
|
240 | + public function add_source($source_id) { |
|
241 | + if ( ! $this->get_id()) { |
|
242 | + $this->set_id($this->create_customer()); |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | $response = WC_Stripe_API::request( |
@@ -251,62 +251,62 @@ discard block |
||
251 | 251 | |
252 | 252 | $wc_token = false; |
253 | 253 | |
254 | - if ( ! empty( $response->error ) ) { |
|
254 | + if ( ! empty($response->error)) { |
|
255 | 255 | // It is possible the WC user once was linked to a customer on Stripe |
256 | 256 | // but no longer exists. Instead of failing, lets try to create a |
257 | 257 | // new customer. |
258 | - if ( $this->is_no_such_customer_error( $response->error ) ) { |
|
258 | + if ($this->is_no_such_customer_error($response->error)) { |
|
259 | 259 | $this->recreate_customer(); |
260 | - return $this->add_source( $source_id ); |
|
260 | + return $this->add_source($source_id); |
|
261 | 261 | } else { |
262 | 262 | return $response; |
263 | 263 | } |
264 | - } elseif ( empty( $response->id ) ) { |
|
265 | - return new WP_Error( 'error', __( 'Unable to add payment source.', 'woocommerce-gateway-stripe' ) ); |
|
264 | + } elseif (empty($response->id)) { |
|
265 | + return new WP_Error('error', __('Unable to add payment source.', 'woocommerce-gateway-stripe')); |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | // Add token to WooCommerce. |
269 | - if ( $this->get_user_id() && class_exists( 'WC_Payment_Token_CC' ) ) { |
|
270 | - if ( ! empty( $response->type ) ) { |
|
271 | - switch ( $response->type ) { |
|
269 | + if ($this->get_user_id() && class_exists('WC_Payment_Token_CC')) { |
|
270 | + if ( ! empty($response->type)) { |
|
271 | + switch ($response->type) { |
|
272 | 272 | case 'alipay': |
273 | 273 | break; |
274 | 274 | case 'sepa_debit': |
275 | 275 | $wc_token = new WC_Payment_Token_SEPA(); |
276 | - $wc_token->set_token( $response->id ); |
|
277 | - $wc_token->set_gateway_id( 'stripe_sepa' ); |
|
278 | - $wc_token->set_last4( $response->sepa_debit->last4 ); |
|
276 | + $wc_token->set_token($response->id); |
|
277 | + $wc_token->set_gateway_id('stripe_sepa'); |
|
278 | + $wc_token->set_last4($response->sepa_debit->last4); |
|
279 | 279 | break; |
280 | 280 | default: |
281 | - if ( 'source' === $response->object && 'card' === $response->type ) { |
|
281 | + if ('source' === $response->object && 'card' === $response->type) { |
|
282 | 282 | $wc_token = new WC_Payment_Token_CC(); |
283 | - $wc_token->set_token( $response->id ); |
|
284 | - $wc_token->set_gateway_id( 'stripe' ); |
|
285 | - $wc_token->set_card_type( strtolower( $response->card->brand ) ); |
|
286 | - $wc_token->set_last4( $response->card->last4 ); |
|
287 | - $wc_token->set_expiry_month( $response->card->exp_month ); |
|
288 | - $wc_token->set_expiry_year( $response->card->exp_year ); |
|
283 | + $wc_token->set_token($response->id); |
|
284 | + $wc_token->set_gateway_id('stripe'); |
|
285 | + $wc_token->set_card_type(strtolower($response->card->brand)); |
|
286 | + $wc_token->set_last4($response->card->last4); |
|
287 | + $wc_token->set_expiry_month($response->card->exp_month); |
|
288 | + $wc_token->set_expiry_year($response->card->exp_year); |
|
289 | 289 | } |
290 | 290 | break; |
291 | 291 | } |
292 | 292 | } else { |
293 | 293 | // Legacy. |
294 | 294 | $wc_token = new WC_Payment_Token_CC(); |
295 | - $wc_token->set_token( $response->id ); |
|
296 | - $wc_token->set_gateway_id( 'stripe' ); |
|
297 | - $wc_token->set_card_type( strtolower( $response->brand ) ); |
|
298 | - $wc_token->set_last4( $response->last4 ); |
|
299 | - $wc_token->set_expiry_month( $response->exp_month ); |
|
300 | - $wc_token->set_expiry_year( $response->exp_year ); |
|
295 | + $wc_token->set_token($response->id); |
|
296 | + $wc_token->set_gateway_id('stripe'); |
|
297 | + $wc_token->set_card_type(strtolower($response->brand)); |
|
298 | + $wc_token->set_last4($response->last4); |
|
299 | + $wc_token->set_expiry_month($response->exp_month); |
|
300 | + $wc_token->set_expiry_year($response->exp_year); |
|
301 | 301 | } |
302 | 302 | |
303 | - $wc_token->set_user_id( $this->get_user_id() ); |
|
303 | + $wc_token->set_user_id($this->get_user_id()); |
|
304 | 304 | $wc_token->save(); |
305 | 305 | } |
306 | 306 | |
307 | 307 | $this->clear_cache(); |
308 | 308 | |
309 | - do_action( 'woocommerce_stripe_add_source', $this->get_id(), $wc_token, $response, $source_id ); |
|
309 | + do_action('woocommerce_stripe_add_source', $this->get_id(), $wc_token, $response, $source_id); |
|
310 | 310 | |
311 | 311 | return $response->id; |
312 | 312 | } |
@@ -318,13 +318,13 @@ discard block |
||
318 | 318 | * @return array |
319 | 319 | */ |
320 | 320 | public function get_sources() { |
321 | - if ( ! $this->get_id() ) { |
|
321 | + if ( ! $this->get_id()) { |
|
322 | 322 | return array(); |
323 | 323 | } |
324 | 324 | |
325 | - $sources = get_transient( 'stripe_sources_' . $this->get_id() ); |
|
325 | + $sources = get_transient('stripe_sources_' . $this->get_id()); |
|
326 | 326 | |
327 | - if ( false === $sources ) { |
|
327 | + if (false === $sources) { |
|
328 | 328 | $response = WC_Stripe_API::request( |
329 | 329 | array( |
330 | 330 | 'limit' => 100, |
@@ -333,35 +333,35 @@ discard block |
||
333 | 333 | 'GET' |
334 | 334 | ); |
335 | 335 | |
336 | - if ( ! empty( $response->error ) ) { |
|
336 | + if ( ! empty($response->error)) { |
|
337 | 337 | return array(); |
338 | 338 | } |
339 | 339 | |
340 | - if ( is_array( $response->data ) ) { |
|
340 | + if (is_array($response->data)) { |
|
341 | 341 | $sources = $response->data; |
342 | 342 | } |
343 | 343 | |
344 | - set_transient( 'stripe_sources_' . $this->get_id(), $sources, DAY_IN_SECONDS ); |
|
344 | + set_transient('stripe_sources_' . $this->get_id(), $sources, DAY_IN_SECONDS); |
|
345 | 345 | } |
346 | 346 | |
347 | - return empty( $sources ) ? array() : $sources; |
|
347 | + return empty($sources) ? array() : $sources; |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | /** |
351 | 351 | * Delete a source from stripe. |
352 | 352 | * @param string $source_id |
353 | 353 | */ |
354 | - public function delete_source( $source_id ) { |
|
355 | - if ( ! $this->get_id() ) { |
|
354 | + public function delete_source($source_id) { |
|
355 | + if ( ! $this->get_id()) { |
|
356 | 356 | return false; |
357 | 357 | } |
358 | 358 | |
359 | - $response = WC_Stripe_API::request( array(), 'customers/' . $this->get_id() . '/sources/' . sanitize_text_field( $source_id ), 'DELETE' ); |
|
359 | + $response = WC_Stripe_API::request(array(), 'customers/' . $this->get_id() . '/sources/' . sanitize_text_field($source_id), 'DELETE'); |
|
360 | 360 | |
361 | 361 | $this->clear_cache(); |
362 | 362 | |
363 | - if ( empty( $response->error ) ) { |
|
364 | - do_action( 'wc_stripe_delete_source', $this->get_id(), $response ); |
|
363 | + if (empty($response->error)) { |
|
364 | + do_action('wc_stripe_delete_source', $this->get_id(), $response); |
|
365 | 365 | |
366 | 366 | return true; |
367 | 367 | } |
@@ -373,10 +373,10 @@ discard block |
||
373 | 373 | * Set default source in Stripe |
374 | 374 | * @param string $source_id |
375 | 375 | */ |
376 | - public function set_default_source( $source_id ) { |
|
376 | + public function set_default_source($source_id) { |
|
377 | 377 | $response = WC_Stripe_API::request( |
378 | 378 | array( |
379 | - 'default_source' => sanitize_text_field( $source_id ), |
|
379 | + 'default_source' => sanitize_text_field($source_id), |
|
380 | 380 | ), |
381 | 381 | 'customers/' . $this->get_id(), |
382 | 382 | 'POST' |
@@ -384,8 +384,8 @@ discard block |
||
384 | 384 | |
385 | 385 | $this->clear_cache(); |
386 | 386 | |
387 | - if ( empty( $response->error ) ) { |
|
388 | - do_action( 'wc_stripe_set_default_source', $this->get_id(), $response ); |
|
387 | + if (empty($response->error)) { |
|
388 | + do_action('wc_stripe_set_default_source', $this->get_id(), $response); |
|
389 | 389 | |
390 | 390 | return true; |
391 | 391 | } |
@@ -397,8 +397,8 @@ discard block |
||
397 | 397 | * Deletes caches for this users cards. |
398 | 398 | */ |
399 | 399 | public function clear_cache() { |
400 | - delete_transient( 'stripe_sources_' . $this->get_id() ); |
|
401 | - delete_transient( 'stripe_customer_' . $this->get_id() ); |
|
400 | + delete_transient('stripe_sources_' . $this->get_id()); |
|
401 | + delete_transient('stripe_customer_' . $this->get_id()); |
|
402 | 402 | $this->customer_data = array(); |
403 | 403 | } |
404 | 404 | |
@@ -408,8 +408,8 @@ discard block |
||
408 | 408 | * @param int $user_id The ID of the WordPress user. |
409 | 409 | * @return string|bool Either the Stripe ID or false. |
410 | 410 | */ |
411 | - public function get_id_from_meta( $user_id ) { |
|
412 | - return get_user_option( '_stripe_customer_id', $user_id ); |
|
411 | + public function get_id_from_meta($user_id) { |
|
412 | + return get_user_option('_stripe_customer_id', $user_id); |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | /** |
@@ -417,15 +417,15 @@ discard block |
||
417 | 417 | * |
418 | 418 | * @param string $id The Stripe customer ID. |
419 | 419 | */ |
420 | - public function update_id_in_meta( $id ) { |
|
421 | - update_user_option( $this->get_user_id(), '_stripe_customer_id', $id, false ); |
|
420 | + public function update_id_in_meta($id) { |
|
421 | + update_user_option($this->get_user_id(), '_stripe_customer_id', $id, false); |
|
422 | 422 | } |
423 | 423 | |
424 | 424 | /** |
425 | 425 | * Deletes the user ID from the meta table with the right key. |
426 | 426 | */ |
427 | 427 | public function delete_id_from_meta() { |
428 | - delete_user_option( $this->get_user_id(), '_stripe_customer_id', false ); |
|
428 | + delete_user_option($this->get_user_id(), '_stripe_customer_id', false); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | /** |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @since 4.0.6 |
6 | 6 | */ |
7 | 7 | |
8 | -if ( ! defined( 'ABSPATH' ) ) { |
|
8 | +if ( ! defined('ABSPATH')) { |
|
9 | 9 | exit; |
10 | 10 | } |
11 | 11 | |
@@ -32,16 +32,16 @@ discard block |
||
32 | 32 | public $apple_pay_verify_notice; |
33 | 33 | |
34 | 34 | public function __construct() { |
35 | - add_action( 'woocommerce_stripe_updated', array( $this, 'verify_domain_if_configured' ) ); |
|
36 | - add_action( 'update_option_woocommerce_stripe_settings', array( $this, 'verify_domain_on_settings_change' ), 10, 2 ); |
|
37 | - add_action( 'admin_notices', array( $this, 'admin_notices' ) ); |
|
35 | + add_action('woocommerce_stripe_updated', array($this, 'verify_domain_if_configured')); |
|
36 | + add_action('update_option_woocommerce_stripe_settings', array($this, 'verify_domain_on_settings_change'), 10, 2); |
|
37 | + add_action('admin_notices', array($this, 'admin_notices')); |
|
38 | 38 | |
39 | - add_action( 'init', array( $this, 'add_domain_association_rewrite_rule' ) ); |
|
40 | - add_filter( 'query_vars', array( $this, 'whitelist_domain_association_query_param' ), 10, 1 ); |
|
41 | - add_action( 'parse_request', array( $this, 'parse_domain_association_request' ), 10, 1 ); |
|
39 | + add_action('init', array($this, 'add_domain_association_rewrite_rule')); |
|
40 | + add_filter('query_vars', array($this, 'whitelist_domain_association_query_param'), 10, 1); |
|
41 | + add_action('parse_request', array($this, 'parse_domain_association_request'), 10, 1); |
|
42 | 42 | |
43 | - $this->stripe_settings = get_option( 'woocommerce_stripe_settings', array() ); |
|
44 | - $this->apple_pay_domain_set = 'yes' === $this->get_option( 'apple_pay_domain_set', 'no' ); |
|
43 | + $this->stripe_settings = get_option('woocommerce_stripe_settings', array()); |
|
44 | + $this->apple_pay_domain_set = 'yes' === $this->get_option('apple_pay_domain_set', 'no'); |
|
45 | 45 | $this->apple_pay_verify_notice = ''; |
46 | 46 | } |
47 | 47 | |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | * @param string default |
54 | 54 | * @return string $setting_value |
55 | 55 | */ |
56 | - public function get_option( $setting = '', $default = '' ) { |
|
57 | - if ( empty( $this->stripe_settings ) ) { |
|
56 | + public function get_option($setting = '', $default = '') { |
|
57 | + if (empty($this->stripe_settings)) { |
|
58 | 58 | return $default; |
59 | 59 | } |
60 | 60 | |
61 | - if ( ! empty( $this->stripe_settings[ $setting ] ) ) { |
|
62 | - return $this->stripe_settings[ $setting ]; |
|
61 | + if ( ! empty($this->stripe_settings[$setting])) { |
|
62 | + return $this->stripe_settings[$setting]; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | return $default; |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | * @return string Secret key. |
73 | 73 | */ |
74 | 74 | private function is_enabled() { |
75 | - $stripe_enabled = 'yes' === $this->get_option( 'enabled', 'no' ); |
|
76 | - $payment_request_button_enabled = 'yes' === $this->get_option( 'payment_request', 'yes' ); |
|
75 | + $stripe_enabled = 'yes' === $this->get_option('enabled', 'no'); |
|
76 | + $payment_request_button_enabled = 'yes' === $this->get_option('payment_request', 'yes'); |
|
77 | 77 | |
78 | 78 | return $stripe_enabled && $payment_request_button_enabled; |
79 | 79 | } |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | * @return string Secret key. |
86 | 86 | */ |
87 | 87 | private function get_secret_key() { |
88 | - $testmode = 'yes' === $this->get_option( 'testmode', 'no' ); |
|
89 | - return $testmode ? $this->get_option( 'test_secret_key' ) : $this->get_option( 'secret_key' ); |
|
88 | + $testmode = 'yes' === $this->get_option('testmode', 'no'); |
|
89 | + return $testmode ? $this->get_option('test_secret_key') : $this->get_option('secret_key'); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -94,9 +94,9 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function add_domain_association_rewrite_rule() { |
96 | 96 | $regex = '^\.well-known\/apple-developer-merchantid-domain-association$'; |
97 | - $redirect = parse_url( WC_STRIPE_PLUGIN_URL, PHP_URL_PATH ) . '/apple-developer-merchantid-domain-association'; |
|
97 | + $redirect = parse_url(WC_STRIPE_PLUGIN_URL, PHP_URL_PATH) . '/apple-developer-merchantid-domain-association'; |
|
98 | 98 | |
99 | - add_rewrite_rule( $regex, $redirect, 'top' ); |
|
99 | + add_rewrite_rule($regex, $redirect, 'top'); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | * @version 4.5.4 |
107 | 107 | * @param string $secret_key |
108 | 108 | */ |
109 | - private function make_domain_registration_request( $secret_key ) { |
|
110 | - if ( empty( $secret_key ) ) { |
|
111 | - throw new Exception( __( 'Unable to verify domain - missing secret key.', 'woocommerce-gateway-stripe' ) ); |
|
109 | + private function make_domain_registration_request($secret_key) { |
|
110 | + if (empty($secret_key)) { |
|
111 | + throw new Exception(__('Unable to verify domain - missing secret key.', 'woocommerce-gateway-stripe')); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | $endpoint = 'https://api.stripe.com/v1/apple_pay/domains'; |
@@ -126,22 +126,22 @@ discard block |
||
126 | 126 | $endpoint, |
127 | 127 | array( |
128 | 128 | 'headers' => $headers, |
129 | - 'body' => http_build_query( $data ), |
|
129 | + 'body' => http_build_query($data), |
|
130 | 130 | ) |
131 | 131 | ); |
132 | 132 | |
133 | - if ( is_wp_error( $response ) ) { |
|
133 | + if (is_wp_error($response)) { |
|
134 | 134 | /* translators: error message */ |
135 | - throw new Exception( sprintf( __( 'Unable to verify domain - %s', 'woocommerce-gateway-stripe' ), $response->get_error_message() ) ); |
|
135 | + throw new Exception(sprintf(__('Unable to verify domain - %s', 'woocommerce-gateway-stripe'), $response->get_error_message())); |
|
136 | 136 | } |
137 | 137 | |
138 | - if ( 200 !== $response['response']['code'] ) { |
|
139 | - $parsed_response = json_decode( $response['body'] ); |
|
138 | + if (200 !== $response['response']['code']) { |
|
139 | + $parsed_response = json_decode($response['body']); |
|
140 | 140 | |
141 | 141 | $this->apple_pay_verify_notice = $parsed_response->error->message; |
142 | 142 | |
143 | 143 | /* translators: error message */ |
144 | - throw new Exception( sprintf( __( 'Unable to verify domain - %s', 'woocommerce-gateway-stripe' ), $parsed_response->error->message ) ); |
|
144 | + throw new Exception(sprintf(__('Unable to verify domain - %s', 'woocommerce-gateway-stripe'), $parsed_response->error->message)); |
|
145 | 145 | } |
146 | 146 | } |
147 | 147 | |
@@ -153,25 +153,25 @@ discard block |
||
153 | 153 | * |
154 | 154 | * @param string $secret_key |
155 | 155 | */ |
156 | - public function register_domain_with_apple( $secret_key ) { |
|
156 | + public function register_domain_with_apple($secret_key) { |
|
157 | 157 | try { |
158 | - $this->make_domain_registration_request( $secret_key ); |
|
158 | + $this->make_domain_registration_request($secret_key); |
|
159 | 159 | |
160 | 160 | // No errors to this point, verification success! |
161 | 161 | $this->stripe_settings['apple_pay_domain_set'] = 'yes'; |
162 | 162 | $this->apple_pay_domain_set = true; |
163 | 163 | |
164 | - update_option( 'woocommerce_stripe_settings', $this->stripe_settings ); |
|
164 | + update_option('woocommerce_stripe_settings', $this->stripe_settings); |
|
165 | 165 | |
166 | - WC_Stripe_Logger::log( 'Your domain has been verified with Apple Pay!' ); |
|
166 | + WC_Stripe_Logger::log('Your domain has been verified with Apple Pay!'); |
|
167 | 167 | |
168 | - } catch ( Exception $e ) { |
|
168 | + } catch (Exception $e) { |
|
169 | 169 | $this->stripe_settings['apple_pay_domain_set'] = 'no'; |
170 | 170 | $this->apple_pay_domain_set = false; |
171 | 171 | |
172 | - update_option( 'woocommerce_stripe_settings', $this->stripe_settings ); |
|
172 | + update_option('woocommerce_stripe_settings', $this->stripe_settings); |
|
173 | 173 | |
174 | - WC_Stripe_Logger::log( 'Error: ' . $e->getMessage() ); |
|
174 | + WC_Stripe_Logger::log('Error: ' . $e->getMessage()); |
|
175 | 175 | } |
176 | 176 | } |
177 | 177 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | public function verify_domain_if_configured() { |
186 | 186 | $secret_key = $this->get_secret_key(); |
187 | 187 | |
188 | - if ( ! $this->is_enabled() || empty( $secret_key ) ) { |
|
188 | + if ( ! $this->is_enabled() || empty($secret_key)) { |
|
189 | 189 | return; |
190 | 190 | } |
191 | 191 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | flush_rewrite_rules(); |
194 | 194 | |
195 | 195 | // Register the domain with Apple Pay. |
196 | - $this->register_domain_with_apple( $secret_key ); |
|
196 | + $this->register_domain_with_apple($secret_key); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | /** |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | * @since 4.5.3 |
203 | 203 | * @version 4.5.4 |
204 | 204 | */ |
205 | - public function verify_domain_on_settings_change( $prev_settings, $settings ) { |
|
205 | + public function verify_domain_on_settings_change($prev_settings, $settings) { |
|
206 | 206 | // Grab previous state and then update cached settings. |
207 | 207 | $this->stripe_settings = $prev_settings; |
208 | 208 | $prev_secret_key = $this->get_secret_key(); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $this->stripe_settings = $settings; |
211 | 211 | |
212 | 212 | // If Stripe or Payment Request Button wasn't enabled (or secret key was different) then might need to verify now. |
213 | - if ( ! $prev_is_enabled || ( $this->get_secret_key() !== $prev_secret_key ) ) { |
|
213 | + if ( ! $prev_is_enabled || ($this->get_secret_key() !== $prev_secret_key)) { |
|
214 | 214 | $this->verify_domain_if_configured(); |
215 | 215 | } |
216 | 216 | } |
@@ -221,16 +221,16 @@ discard block |
||
221 | 221 | * @since 4.0.6 |
222 | 222 | */ |
223 | 223 | public function admin_notices() { |
224 | - if ( ! $this->is_enabled() ) { |
|
224 | + if ( ! $this->is_enabled()) { |
|
225 | 225 | return; |
226 | 226 | } |
227 | 227 | |
228 | - if ( ! current_user_can( 'manage_woocommerce' ) ) { |
|
228 | + if ( ! current_user_can('manage_woocommerce')) { |
|
229 | 229 | return; |
230 | 230 | } |
231 | 231 | |
232 | - $empty_notice = empty( $this->apple_pay_verify_notice ); |
|
233 | - if ( $empty_notice && ( $this->apple_pay_domain_set || empty( $this->secret_key ) ) ) { |
|
232 | + $empty_notice = empty($this->apple_pay_verify_notice); |
|
233 | + if ($empty_notice && ($this->apple_pay_domain_set || empty($this->secret_key))) { |
|
234 | 234 | return; |
235 | 235 | } |
236 | 236 | |
@@ -239,28 +239,28 @@ discard block |
||
239 | 239 | * when setting screen is displayed. So if domain verification is not set, |
240 | 240 | * something went wrong so lets notify user. |
241 | 241 | */ |
242 | - $allowed_html = array( |
|
242 | + $allowed_html = array( |
|
243 | 243 | 'a' => array( |
244 | 244 | 'href' => array(), |
245 | 245 | 'title' => array(), |
246 | 246 | ), |
247 | 247 | ); |
248 | - $verification_failed_without_error = __( 'Apple Pay domain verification failed.', 'woocommerce-gateway-stripe' ); |
|
249 | - $verification_failed_with_error = __( 'Apple Pay domain verification failed with the following error:', 'woocommerce-gateway-stripe' ); |
|
248 | + $verification_failed_without_error = __('Apple Pay domain verification failed.', 'woocommerce-gateway-stripe'); |
|
249 | + $verification_failed_with_error = __('Apple Pay domain verification failed with the following error:', 'woocommerce-gateway-stripe'); |
|
250 | 250 | $check_log_text = sprintf( |
251 | 251 | /* translators: 1) HTML anchor open tag 2) HTML anchor closing tag */ |
252 | - esc_html__( 'Please check the %1$slogs%2$s for more details on this issue. Logging must be enabled to see recorded logs.', 'woocommerce-gateway-stripe' ), |
|
253 | - '<a href="' . admin_url( 'admin.php?page=wc-status&tab=logs' ) . '">', |
|
252 | + esc_html__('Please check the %1$slogs%2$s for more details on this issue. Logging must be enabled to see recorded logs.', 'woocommerce-gateway-stripe'), |
|
253 | + '<a href="' . admin_url('admin.php?page=wc-status&tab=logs') . '">', |
|
254 | 254 | '</a>' |
255 | 255 | ); |
256 | 256 | |
257 | 257 | ?> |
258 | 258 | <div class="error stripe-apple-pay-message"> |
259 | - <?php if ( $empty_notice ) : ?> |
|
260 | - <p><?php echo esc_html( $verification_failed_without_error ); ?></p> |
|
259 | + <?php if ($empty_notice) : ?> |
|
260 | + <p><?php echo esc_html($verification_failed_without_error); ?></p> |
|
261 | 261 | <?php else : ?> |
262 | - <p><?php echo esc_html( $verification_failed_with_error ); ?></p> |
|
263 | - <p><i><?php echo wp_kses( make_clickable( esc_html( $this->apple_pay_verify_notice ) ), $allowed_html ); ?></i></p> |
|
262 | + <p><?php echo esc_html($verification_failed_with_error); ?></p> |
|
263 | + <p><i><?php echo wp_kses(make_clickable(esc_html($this->apple_pay_verify_notice)), $allowed_html); ?></i></p> |
|
264 | 264 | <?php endif; ?> |
265 | 265 | <p><?php echo $check_log_text; ?></p> |
266 | 266 | </div> |