@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | * |
5 | 5 | */ |
6 | 6 | |
7 | -defined( 'ABSPATH' ) || exit; |
|
7 | +defined('ABSPATH') || exit; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Manual Payment Gateway class. |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @var array |
26 | 26 | */ |
27 | - protected $supports = array( 'subscription', 'addons' ); |
|
27 | + protected $supports = array('subscription', 'addons'); |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Payment method order. |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | public function __construct() { |
40 | 40 | parent::__construct(); |
41 | 41 | |
42 | - $this->title = __( 'Test Gateway', 'invoicing' ); |
|
43 | - $this->method_title = __( 'Test Gateway', 'invoicing' ); |
|
42 | + $this->title = __('Test Gateway', 'invoicing'); |
|
43 | + $this->method_title = __('Test Gateway', 'invoicing'); |
|
44 | 44 | |
45 | - add_filter( 'getpaid_daily_maintenance_should_expire_subscription', array( $this, 'maybe_renew_subscription' ), 10, 2 ); |
|
45 | + add_filter('getpaid_daily_maintenance_should_expire_subscription', array($this, 'maybe_renew_subscription'), 10, 2); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -54,16 +54,16 @@ discard block |
||
54 | 54 | * @param GetPaid_Payment_Form_Submission $submission Checkout submission. |
55 | 55 | * @return array |
56 | 56 | */ |
57 | - public function process_payment( $invoice, $submission_data, $submission ) { |
|
57 | + public function process_payment($invoice, $submission_data, $submission) { |
|
58 | 58 | |
59 | 59 | // Mark it as paid. |
60 | 60 | $invoice->mark_paid(); |
61 | 61 | |
62 | 62 | // (Maybe) activate subscription. |
63 | - getpaid_activate_invoice_subscription( $invoice ); |
|
63 | + getpaid_activate_invoice_subscription($invoice); |
|
64 | 64 | |
65 | 65 | // Send to the success page. |
66 | - wpinv_send_to_success_page( array( 'invoice_key' => $invoice->get_key() ) ); |
|
66 | + wpinv_send_to_success_page(array('invoice_key' => $invoice->get_key())); |
|
67 | 67 | |
68 | 68 | } |
69 | 69 | |
@@ -74,15 +74,15 @@ discard block |
||
74 | 74 | * @param bool $should_expire |
75 | 75 | * @param WPInv_Subscription $subscription |
76 | 76 | */ |
77 | - public function maybe_renew_subscription( $should_expire, $subscription ) { |
|
77 | + public function maybe_renew_subscription($should_expire, $subscription) { |
|
78 | 78 | |
79 | 79 | // Ensure its our subscription && it's active. |
80 | - if ( 'manual' != $subscription->get_gateway() || ! $subscription->has_status( 'active trialling' ) ) { |
|
80 | + if ('manual' != $subscription->get_gateway() || !$subscription->has_status('active trialling')) { |
|
81 | 81 | return $should_expire; |
82 | 82 | } |
83 | 83 | |
84 | 84 | // If this is the last renewal, complete the subscription. |
85 | - if ( $subscription->is_last_renewal() ) { |
|
85 | + if ($subscription->is_last_renewal()) { |
|
86 | 86 | $subscription->complete(); |
87 | 87 | return false; |
88 | 88 | } |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | * @param GetPaid_Form_Item[] $items |
109 | 109 | * @return WPInv_Invoice |
110 | 110 | */ |
111 | - public function process_addons( $invoice, $items ) { |
|
111 | + public function process_addons($invoice, $items) { |
|
112 | 112 | |
113 | - foreach ( $items as $item ) { |
|
114 | - $invoice->add_item( $item ); |
|
113 | + foreach ($items as $item) { |
|
114 | + $invoice->add_item($item); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | $invoice->recalculate_total(); |