@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $post_status = $this->get_post_status( $payment->status, null ); |
114 | 114 | |
115 | 115 | if ( null !== $post_status ) { |
116 | - $data['post_status'] = $post_status; |
|
116 | + $data[ 'post_status' ] = $post_status; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | wp_update_post( $data ); |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | |
285 | 285 | $can_redirect = false; |
286 | 286 | |
287 | - do_action( 'pronamic_payment_status_update_' . $payment->source . '_' . $old . '_to_' . $new, $payment, $can_redirect, $previous_status, $payment->status ); |
|
288 | - do_action( 'pronamic_payment_status_update_' . $payment->source, $payment, $can_redirect, $previous_status, $payment->status ); |
|
287 | + do_action( 'pronamic_payment_status_update_'.$payment->source.'_'.$old.'_to_'.$new, $payment, $can_redirect, $previous_status, $payment->status ); |
|
288 | + do_action( 'pronamic_payment_status_update_'.$payment->source, $payment, $can_redirect, $previous_status, $payment->status ); |
|
289 | 289 | do_action( 'pronamic_payment_status_update', $payment, $can_redirect, $previous_status, $payment->status ); |
290 | 290 | } |
291 | 291 | } |
@@ -82,15 +82,15 @@ discard block |
||
82 | 82 | * email notifications so users can cancel or renew their subscription. |
83 | 83 | */ |
84 | 84 | public function handle_subscription() { |
85 | - if ( ! filter_has_var( INPUT_GET, 'subscription' ) ) { |
|
85 | + if ( !filter_has_var( INPUT_GET, 'subscription' ) ) { |
|
86 | 86 | return; |
87 | 87 | } |
88 | 88 | |
89 | - if ( ! filter_has_var( INPUT_GET, 'action' ) ) { |
|
89 | + if ( !filter_has_var( INPUT_GET, 'action' ) ) { |
|
90 | 90 | return; |
91 | 91 | } |
92 | 92 | |
93 | - if ( ! filter_has_var( INPUT_GET, 'key' ) ) { |
|
93 | + if ( !filter_has_var( INPUT_GET, 'key' ) ) { |
|
94 | 94 | return; |
95 | 95 | } |
96 | 96 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $key = filter_input( INPUT_GET, 'key', FILTER_SANITIZE_STRING ); |
103 | 103 | |
104 | 104 | // Check if subscription is valid. |
105 | - if ( ! $subscription ) { |
|
105 | + if ( !$subscription ) { |
|
106 | 106 | return; |
107 | 107 | } |
108 | 108 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | if ( Statuses::SUCCESS !== $subscription->get_status() ) { |
132 | 132 | $payment = $this->start_recurring( $subscription, $gateway, true ); |
133 | 133 | |
134 | - if ( ! $gateway->has_error() ) { |
|
134 | + if ( !$gateway->has_error() ) { |
|
135 | 135 | // Redirect. |
136 | 136 | $gateway->redirect( $payment ); |
137 | 137 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $payment->start_date = $start_date; |
201 | 201 | $payment->end_date = $end_date; |
202 | 202 | $payment->recurring_type = 'recurring'; |
203 | - $payment->recurring = ! $renewal; |
|
203 | + $payment->recurring = !$renewal; |
|
204 | 204 | |
205 | 205 | // Start payment. |
206 | 206 | $payment = Plugin::start_payment( $payment, $gateway ); |
@@ -243,11 +243,11 @@ discard block |
||
243 | 243 | * @return array |
244 | 244 | */ |
245 | 245 | public function exclude_subscription_comment_notes( $clauses, $query ) { |
246 | - $type = $query->query_vars['type']; |
|
246 | + $type = $query->query_vars[ 'type' ]; |
|
247 | 247 | |
248 | 248 | // Ignore subscription notes comments if it's not specifically requested. |
249 | 249 | if ( 'subscription_note' !== $type ) { |
250 | - $clauses['where'] .= " AND comment_type != 'subscription_note'"; |
|
250 | + $clauses[ 'where' ] .= " AND comment_type != 'subscription_note'"; |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | return $clauses; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | // Check if there is already subscription attached to the payment. |
274 | 274 | $subscription_id = $payment->get_subscription_id(); |
275 | 275 | |
276 | - if ( ! empty( $subscription_id ) ) { |
|
276 | + if ( !empty( $subscription_id ) ) { |
|
277 | 277 | // Subscription already created. |
278 | 278 | return; |
279 | 279 | } |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | delete_post_meta( $post->ID, '_pronamic_subscription_renewal_sent_1week' ); |
478 | 478 | } |
479 | 479 | |
480 | - do_action( 'pronamic_subscription_renewal_notice_' . $subscription->get_source(), $subscription ); |
|
480 | + do_action( 'pronamic_subscription_renewal_notice_'.$subscription->get_source(), $subscription ); |
|
481 | 481 | |
482 | 482 | update_post_meta( $post->ID, '_pronamic_subscription_renewal_sent_1week', $start_date->format( DateTime::MYSQL ) ); |
483 | 483 | } |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | } |
523 | 523 | |
524 | 524 | // The status of canceled or completed subscriptions will not be changed automatically. |
525 | - if ( ! in_array( $status_before, array( Statuses::CANCELLED, Statuses::COMPLETED ), true ) ) { |
|
525 | + if ( !in_array( $status_before, array( Statuses::CANCELLED, Statuses::COMPLETED ), true ) ) { |
|
526 | 526 | $subscription->set_status( $status_update ); |
527 | 527 | } |
528 | 528 |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $post_status = $this->get_post_status( $subscription->get_status(), null ); |
99 | 99 | |
100 | 100 | if ( null !== $post_status ) { |
101 | - $data['post_status'] = $post_status; |
|
101 | + $data[ 'post_status' ] = $post_status; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | wp_update_post( $data ); |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | |
293 | 293 | $can_redirect = false; |
294 | 294 | |
295 | - do_action( 'pronamic_subscription_status_update_' . $subscription->source . '_' . $old . '_to_' . $new, $subscription, $can_redirect, $previous_status, $subscription->status ); |
|
296 | - do_action( 'pronamic_subscription_status_update_' . $subscription->source, $subscription, $can_redirect, $previous_status, $subscription->status ); |
|
295 | + do_action( 'pronamic_subscription_status_update_'.$subscription->source.'_'.$old.'_to_'.$new, $subscription, $can_redirect, $previous_status, $subscription->status ); |
|
296 | + do_action( 'pronamic_subscription_status_update_'.$subscription->source, $subscription, $can_redirect, $previous_status, $subscription->status ); |
|
297 | 297 | do_action( 'pronamic_subscription_status_update', $subscription, $can_redirect, $previous_status, $subscription->status ); |
298 | 298 | } |
299 | 299 | } |
@@ -20,12 +20,15 @@ |
||
20 | 20 | |
21 | 21 | <?php esc_html_e( 'No notes found.', 'pronamic_ideal' ); ?> |
22 | 22 | |
23 | -<?php else : ?> |
|
23 | +<?php else { |
|
24 | + : ?> |
|
24 | 25 | |
25 | 26 | <table class="pronamic-pay-table widefat"> |
26 | 27 | <thead> |
27 | 28 | <tr> |
28 | - <th scope="col"><?php esc_html_e( 'Date', 'pronamic_ideal' ); ?></th> |
|
29 | + <th scope="col"><?php esc_html_e( 'Date', 'pronamic_ideal' ); |
|
30 | +} |
|
31 | +?></th> |
|
29 | 32 | <th scope="col"><?php esc_html_e( 'Note', 'pronamic_ideal' ); ?></th> |
30 | 33 | <th scope="col"><?php esc_html_e( 'User', 'pronamic_ideal' ); ?></th> |
31 | 34 | </tr> |