@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 9 | +if (!defined('ABSPATH')) { |
|
| 10 | 10 | exit; // Exit if accessed directly |
| 11 | 11 | } |
| 12 | 12 | |
@@ -20,14 +20,14 @@ discard block |
||
| 20 | 20 | * |
| 21 | 21 | * @param WP_Post $post |
| 22 | 22 | */ |
| 23 | - public static function output( $post ) { |
|
| 23 | + public static function output($post) { |
|
| 24 | 24 | ?> |
| 25 | 25 | <div id="wpinv-form-builder" class="bsui"> |
| 26 | 26 | <div class="row"> |
| 27 | 27 | <div class="col-sm-4"> |
| 28 | 28 | |
| 29 | 29 | <!-- Builder tabs --> |
| 30 | - <button class="button button-primary" v-if="active_tab!='new_item'" @click.prevent="active_tab='new_item'"><?php _e( 'Go Back', 'invoicing' ); ?></button> |
|
| 30 | + <button class="button button-primary" v-if="active_tab!='new_item'" @click.prevent="active_tab='new_item'"><?php _e('Go Back', 'invoicing'); ?></button> |
|
| 31 | 31 | |
| 32 | 32 | <!-- Builder tab content --> |
| 33 | 33 | <div class="mt-4"> |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | <!-- Available builder elements --> |
| 36 | 36 | <div class="wpinv-form-builder-tab-pane" v-if="active_tab=='new_item'"> |
| 37 | 37 | <div class="wpinv-form-builder-add-field-types"> |
| 38 | - <small class='form-text text-muted'><?php _e( 'Add an element by dragging it to the payment form.', 'invoicing' ); ?></small> |
|
| 38 | + <small class='form-text text-muted'><?php _e('Add an element by dragging it to the payment form.', 'invoicing'); ?></small> |
|
| 39 | 39 | <draggable class="section mt-2" style="display: flex; flex-flow: wrap; justify-content: space-between;" v-model="elements" :group="{ name: 'fields', pull: 'clone', put: false }" :sort="false" :clone="addDraggedField" tag="ul" filter=".wpinv-undraggable"> |
| 40 | 40 | <li v-for="element in elements" class= "wpinv-payment-form-left-fields-field" @click.prevent="addField(element)" :class="{ 'd-none': element.defaults.premade }"> |
| 41 | 41 | <button class="button btn"> |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | <!-- Edit an element --> |
| 51 | 51 | <div class="wpinv-form-builder-tab-pane" v-if="active_tab=='edit_item'" style="font-size: 14px;"> |
| 52 | 52 | <div class="wpinv-form-builder-edit-field-wrapper"> |
| 53 | - <?php do_action( 'wpinv_payment_form_edit_element_template', 'active_form_element', $post ); ?> |
|
| 54 | - <?php do_action( 'getpaid_payment_form_edit_element_template', $post ); ?> |
|
| 53 | + <?php do_action('wpinv_payment_form_edit_element_template', 'active_form_element', $post); ?> |
|
| 54 | + <?php do_action('getpaid_payment_form_edit_element_template', $post); ?> |
|
| 55 | 55 | <div> |
| 56 | - <button type="button" class="button button-link button-link-delete" @click.prevent="removeField(active_form_element)" v-show="! active_form_element.premade"><?php _e( 'Delete Element', 'invoicing' ); ?></button> |
|
| 56 | + <button type="button" class="button button-link button-link-delete" @click.prevent="removeField(active_form_element)" v-show="! active_form_element.premade"><?php _e('Delete Element', 'invoicing'); ?></button> |
|
| 57 | 57 | </div> |
| 58 | 58 | </div> |
| 59 | 59 | </div> |
@@ -62,14 +62,14 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | </div> |
| 64 | 64 | <div class="col-sm-8 border-left"> |
| 65 | - <small class='form-text text-muted' v-if='form_elements.length'><?php _e( 'Click on any element to edit or delete it.', 'invoicing' ); ?></small> |
|
| 66 | - <p class='form-text text-muted' v-if='! form_elements.length'><?php _e( 'This form is empty. Add new elements by dragging them from the right.', 'invoicing' ); ?></p> |
|
| 65 | + <small class='form-text text-muted' v-if='form_elements.length'><?php _e('Click on any element to edit or delete it.', 'invoicing'); ?></small> |
|
| 66 | + <p class='form-text text-muted' v-if='! form_elements.length'><?php _e('This form is empty. Add new elements by dragging them from the right.', 'invoicing'); ?></p> |
|
| 67 | 67 | |
| 68 | 68 | <draggable class="section bsui" v-model="form_elements" @add="highlightLastDroppedField" group="fields" tag="div" style="min-height: 100%; font-size: 14px;"> |
| 69 | 69 | <div v-for="form_element in form_elements" class="wpinv-form-builder-element-preview" :class="[{ active: active_form_element==form_element && active_tab=='edit_item' }, form_element.type]" @click="active_tab = 'edit_item'; active_form_element = form_element"> |
| 70 | 70 | <div class="wpinv-form-builder-element-preview-inner"> |
| 71 | 71 | <div class="wpinv-payment-form-field-preview-overlay"></div> |
| 72 | - <?php do_action( 'wpinv_payment_form_render_element_template', 'form_element', $post ); ?> |
|
| 72 | + <?php do_action('wpinv_payment_form_render_element_template', 'form_element', $post); ?> |
|
| 73 | 73 | </div> |
| 74 | 74 | </div> |
| 75 | 75 | </draggable> |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | </div> |
| 83 | 83 | <?php |
| 84 | 84 | |
| 85 | - wp_nonce_field( 'getpaid_meta_nonce', 'getpaid_meta_nonce' ); |
|
| 85 | + wp_nonce_field('getpaid_meta_nonce', 'getpaid_meta_nonce'); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
@@ -90,33 +90,33 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @param int $post_id |
| 92 | 92 | */ |
| 93 | - public static function save( $post_id ) { |
|
| 93 | + public static function save($post_id) { |
|
| 94 | 94 | |
| 95 | 95 | // Prepare the form. |
| 96 | - $form = new GetPaid_Payment_Form( $post_id ); |
|
| 96 | + $form = new GetPaid_Payment_Form($post_id); |
|
| 97 | 97 | |
| 98 | 98 | // Fetch form items. |
| 99 | - $form_items = json_decode( wp_unslash( $_POST['wpinv_form_items'] ), true ); |
|
| 99 | + $form_items = json_decode(wp_unslash($_POST['wpinv_form_items']), true); |
|
| 100 | 100 | |
| 101 | 101 | // Ensure that we have an array... |
| 102 | - if ( empty( $form_items ) ) { |
|
| 102 | + if (empty($form_items)) { |
|
| 103 | 103 | $form_items = array(); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // Add it to the form. |
| 107 | - $form->set_items( self::item_to_objects( $form_items ) ); |
|
| 107 | + $form->set_items(self::item_to_objects($form_items)); |
|
| 108 | 108 | |
| 109 | 109 | // Save form elements. |
| 110 | - $form_elements = json_decode( wp_unslash( $_POST['wpinv_form_elements'] ), true ); |
|
| 111 | - if ( empty( $form_elements ) ) { |
|
| 110 | + $form_elements = json_decode(wp_unslash($_POST['wpinv_form_elements']), true); |
|
| 111 | + if (empty($form_elements)) { |
|
| 112 | 112 | $form_elements = array(); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - $form->set_elements( $form_elements ); |
|
| 115 | + $form->set_elements($form_elements); |
|
| 116 | 116 | |
| 117 | 117 | // Persist data to the datastore. |
| 118 | 118 | $form->save(); |
| 119 | - do_action( 'getpaid_payment_form_metabox_save', $post_id, $form ); |
|
| 119 | + do_action('getpaid_payment_form_metabox_save', $post_id, $form); |
|
| 120 | 120 | |
| 121 | 121 | } |
| 122 | 122 | |
@@ -125,14 +125,14 @@ discard block |
||
| 125 | 125 | * |
| 126 | 126 | * @param array $items |
| 127 | 127 | */ |
| 128 | - public static function item_to_objects( $items ) { |
|
| 128 | + public static function item_to_objects($items) { |
|
| 129 | 129 | |
| 130 | 130 | $objects = array(); |
| 131 | 131 | |
| 132 | - foreach ( $items as $item ) { |
|
| 133 | - $_item = new GetPaid_Form_Item( $item['id'] ); |
|
| 134 | - $_item->set_allow_quantities( (bool) $item['allow_quantities'] ); |
|
| 135 | - $_item->set_is_required( (bool) $item['required'] ); |
|
| 132 | + foreach ($items as $item) { |
|
| 133 | + $_item = new GetPaid_Form_Item($item['id']); |
|
| 134 | + $_item->set_allow_quantities((bool) $item['allow_quantities']); |
|
| 135 | + $_item->set_is_required((bool) $item['required']); |
|
| 136 | 136 | $objects[] = $_item; |
| 137 | 137 | } |
| 138 | 138 | |
@@ -7,29 +7,29 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | // Cart table columns. |
| 13 | 13 | $columns = array( |
| 14 | - 'name' => __( 'Item', 'invoicing' ), |
|
| 15 | - 'price' => __( 'Price', 'invoicing' ), |
|
| 16 | - 'quantity' => __( 'Quantity', 'invoicing' ), |
|
| 17 | - 'subtotal' => __( 'Subtotal', 'invoicing' ), |
|
| 14 | + 'name' => __('Item', 'invoicing'), |
|
| 15 | + 'price' => __('Price', 'invoicing'), |
|
| 16 | + 'quantity' => __('Quantity', 'invoicing'), |
|
| 17 | + 'subtotal' => __('Subtotal', 'invoicing'), |
|
| 18 | 18 | ); |
| 19 | 19 | |
| 20 | -if ( ! empty( $form->invoice ) ) { |
|
| 21 | - $columns = getpaid_invoice_item_columns( $form->invoice ); |
|
| 20 | +if (!empty($form->invoice)) { |
|
| 21 | + $columns = getpaid_invoice_item_columns($form->invoice); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | -$columns = apply_filters( 'getpaid_payment_form_cart_table_columns', $columns, $form ); |
|
| 24 | +$columns = apply_filters('getpaid_payment_form_cart_table_columns', $columns, $form); |
|
| 25 | 25 | |
| 26 | 26 | ?> |
| 27 | 27 | <div class="getpaid-payment-form-items-cart border form-group"> |
| 28 | 28 | <div class="getpaid-payment-form-items-cart-header"> |
| 29 | 29 | <div class="form-row"> |
| 30 | - <?php foreach ( $columns as $key => $label ) : ?> |
|
| 31 | - <div class="<?php echo 'name' == $key ? 'col-12 col-sm-5' : 'col-12 col-sm' ?> getpaid-form-cart-item-<?php echo esc_attr( $key ); ?>"> |
|
| 32 | - <?php echo sanitize_text_field( $label ); ?> |
|
| 30 | + <?php foreach ($columns as $key => $label) : ?> |
|
| 31 | + <div class="<?php echo 'name' == $key ? 'col-12 col-sm-5' : 'col-12 col-sm' ?> getpaid-form-cart-item-<?php echo esc_attr($key); ?>"> |
|
| 32 | + <?php echo sanitize_text_field($label); ?> |
|
| 33 | 33 | </div> |
| 34 | 34 | <?php endforeach; ?> |
| 35 | 35 | </div> |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | <?php |
| 38 | 38 | |
| 39 | 39 | // Display the item totals. |
| 40 | - foreach ( $form->get_items() as $item ) { |
|
| 41 | - wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) ); |
|
| 40 | + foreach ($form->get_items() as $item) { |
|
| 41 | + wpinv_get_template('payment-forms/cart-item.php', compact('form', 'item', 'columns')); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | // Display the cart totals. |
| 45 | - wpinv_get_template( 'payment-forms/cart-totals.php', compact( 'form' ) ); |
|
| 45 | + wpinv_get_template('payment-forms/cart-totals.php', compact('form')); |
|
| 46 | 46 | |
| 47 | 47 | ?> |
| 48 | 48 | </div> |
@@ -7,17 +7,17 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | // Prepare the selectable items. |
| 13 | 13 | $selectable = array(); |
| 14 | -foreach ( $form->get_items() as $item ) { |
|
| 15 | - if ( ! $item->is_required ) { |
|
| 16 | - $selectable[$item->get_id()] = strip_tags( $item->get_name() . ' — ' . wpinv_price( wpinv_format_amount( $item->get_initial_price() ) ) ); |
|
| 14 | +foreach ($form->get_items() as $item) { |
|
| 15 | + if (!$item->is_required) { |
|
| 16 | + $selectable[$item->get_id()] = strip_tags($item->get_name() . ' — ' . wpinv_price(wpinv_format_amount($item->get_initial_price()))); |
|
| 17 | 17 | } |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | -if ( empty( $selectable ) ) { |
|
| 20 | +if (empty($selectable)) { |
|
| 21 | 21 | return; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | echo aui()->select( |
| 28 | 28 | array( |
| 29 | 29 | 'name' => 'getpaid-payment-form-selected-item', |
| 30 | - 'id' => 'getpaid-payment-form-selected-item' . uniqid( '_' ), |
|
| 30 | + 'id' => 'getpaid-payment-form-selected-item' . uniqid('_'), |
|
| 31 | 31 | 'required' => true, |
| 32 | - 'label' => __( 'Select Item', 'invoicing' ), |
|
| 32 | + 'label' => __('Select Item', 'invoicing'), |
|
| 33 | 33 | 'label_type' => 'vertical', |
| 34 | 34 | 'inline' => false, |
| 35 | 35 | 'options' => $selectable, |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 2 | +if (!defined('ABSPATH')) { |
|
| 3 | 3 | exit; |
| 4 | 4 | } |
| 5 | 5 | |
@@ -87,9 +87,9 @@ discard block |
||
| 87 | 87 | * @param string $context View or edit context. |
| 88 | 88 | * @return string |
| 89 | 89 | */ |
| 90 | - public function get_name( $context = 'view' ) { |
|
| 91 | - $name = parent::get_name( $context ); |
|
| 92 | - return $name . wpinv_get_item_suffix( $this ); |
|
| 90 | + public function get_name($context = 'view') { |
|
| 91 | + $name = parent::get_name($context); |
|
| 92 | + return $name . wpinv_get_item_suffix($this); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -99,8 +99,8 @@ discard block |
||
| 99 | 99 | * @param string $context View or edit context. |
| 100 | 100 | * @return string |
| 101 | 101 | */ |
| 102 | - public function get_raw_name( $context = 'view' ) { |
|
| 103 | - return parent::get_name( $context ); |
|
| 102 | + public function get_raw_name($context = 'view') { |
|
| 103 | + return parent::get_name($context); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -110,13 +110,13 @@ discard block |
||
| 110 | 110 | * @param string $context View or edit context. |
| 111 | 111 | * @return string |
| 112 | 112 | */ |
| 113 | - public function get_description( $context = 'view' ) { |
|
| 113 | + public function get_description($context = 'view') { |
|
| 114 | 114 | |
| 115 | - if ( isset( $this->custom_description ) ) { |
|
| 115 | + if (isset($this->custom_description)) { |
|
| 116 | 116 | return $this->custom_description; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - return parent::get_description( $context ); |
|
| 119 | + return parent::get_description($context); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | * @param string $context View or edit context. |
| 127 | 127 | * @return float |
| 128 | 128 | */ |
| 129 | - public function get_sub_total( $context = 'view' ) { |
|
| 130 | - return $this->get_quantity( $context ) * $this->get_initial_price( $context ); |
|
| 129 | + public function get_sub_total($context = 'view') { |
|
| 130 | + return $this->get_quantity($context) * $this->get_initial_price($context); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -137,10 +137,10 @@ discard block |
||
| 137 | 137 | * @param string $context View or edit context. |
| 138 | 138 | * @return float |
| 139 | 139 | */ |
| 140 | - public function get_recurring_sub_total( $context = 'view' ) { |
|
| 140 | + public function get_recurring_sub_total($context = 'view') { |
|
| 141 | 141 | |
| 142 | - if ( $this->is_recurring() ) { |
|
| 143 | - return $this->get_quantity( $context ) * $this->get_price( $context ); |
|
| 142 | + if ($this->is_recurring()) { |
|
| 143 | + return $this->get_quantity($context) * $this->get_price($context); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | return 0; |
@@ -149,8 +149,8 @@ discard block |
||
| 149 | 149 | /** |
| 150 | 150 | * @deprecated |
| 151 | 151 | */ |
| 152 | - public function get_qantity( $context = 'view' ) { |
|
| 153 | - return $this->get_quantity( $context ); |
|
| 152 | + public function get_qantity($context = 'view') { |
|
| 153 | + return $this->get_quantity($context); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /** |
@@ -160,15 +160,15 @@ discard block |
||
| 160 | 160 | * @param string $context View or edit context. |
| 161 | 161 | * @return int |
| 162 | 162 | */ |
| 163 | - public function get_quantity( $context = 'view' ) { |
|
| 163 | + public function get_quantity($context = 'view') { |
|
| 164 | 164 | $quantity = (int) $this->quantity; |
| 165 | 165 | |
| 166 | - if ( empty( $quantity ) || 1 > $quantity ) { |
|
| 166 | + if (empty($quantity) || 1 > $quantity) { |
|
| 167 | 167 | $quantity = 1; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | - if ( 'view' == $context ) { |
|
| 171 | - return apply_filters( 'getpaid_payment_form_item_quantity', $quantity, $this ); |
|
| 170 | + if ('view' == $context) { |
|
| 171 | + return apply_filters('getpaid_payment_form_item_quantity', $quantity, $this); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | return $quantity; |
@@ -182,11 +182,11 @@ discard block |
||
| 182 | 182 | * @param string $context View or edit context. |
| 183 | 183 | * @return meta |
| 184 | 184 | */ |
| 185 | - public function get_item_meta( $context = 'view' ) { |
|
| 185 | + public function get_item_meta($context = 'view') { |
|
| 186 | 186 | $meta = $this->meta; |
| 187 | 187 | |
| 188 | - if ( 'view' == $context ) { |
|
| 189 | - return apply_filters( 'getpaid_payment_form_item_meta', $meta, $this ); |
|
| 188 | + if ('view' == $context) { |
|
| 189 | + return apply_filters('getpaid_payment_form_item_meta', $meta, $this); |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | return $meta; |
@@ -200,11 +200,11 @@ discard block |
||
| 200 | 200 | * @param string $context View or edit context. |
| 201 | 201 | * @return bool |
| 202 | 202 | */ |
| 203 | - public function get_allow_quantities( $context = 'view' ) { |
|
| 203 | + public function get_allow_quantities($context = 'view') { |
|
| 204 | 204 | $allow_quantities = (bool) $this->allow_quantities; |
| 205 | 205 | |
| 206 | - if ( 'view' == $context ) { |
|
| 207 | - return apply_filters( 'getpaid_payment_form_item_allow_quantities', $allow_quantities, $this ); |
|
| 206 | + if ('view' == $context) { |
|
| 207 | + return apply_filters('getpaid_payment_form_item_allow_quantities', $allow_quantities, $this); |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | return $allow_quantities; |
@@ -218,11 +218,11 @@ discard block |
||
| 218 | 218 | * @param string $context View or edit context. |
| 219 | 219 | * @return bool |
| 220 | 220 | */ |
| 221 | - public function get_is_required( $context = 'view' ) { |
|
| 221 | + public function get_is_required($context = 'view') { |
|
| 222 | 222 | $is_required = (bool) $this->is_required; |
| 223 | 223 | |
| 224 | - if ( 'view' == $context ) { |
|
| 225 | - return apply_filters( 'getpaid_payment_form_item_is_required', $is_required, $this ); |
|
| 224 | + if ('view' == $context) { |
|
| 225 | + return apply_filters('getpaid_payment_form_item_is_required', $is_required, $this); |
|
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | return $is_required; |
@@ -235,11 +235,11 @@ discard block |
||
| 235 | 235 | * @since 1.0.19 |
| 236 | 236 | * @return array |
| 237 | 237 | */ |
| 238 | - public function prepare_data_for_use( $required = null ) { |
|
| 238 | + public function prepare_data_for_use($required = null) { |
|
| 239 | 239 | |
| 240 | - $required = is_null( $required ) ? $this->is_required() : $required; |
|
| 240 | + $required = is_null($required) ? $this->is_required() : $required; |
|
| 241 | 241 | return array( |
| 242 | - 'title' => strip_tags( $this->get_name() ), |
|
| 242 | + 'title' => strip_tags($this->get_name()), |
|
| 243 | 243 | 'id' => $this->get_id(), |
| 244 | 244 | 'price' => $this->get_price(), |
| 245 | 245 | 'recurring' => $this->is_recurring(), |
@@ -256,28 +256,28 @@ discard block |
||
| 256 | 256 | * @since 1.0.19 |
| 257 | 257 | * @return array |
| 258 | 258 | */ |
| 259 | - public function prepare_data_for_invoice_edit_ajax( $currency = '' ) { |
|
| 259 | + public function prepare_data_for_invoice_edit_ajax($currency = '') { |
|
| 260 | 260 | |
| 261 | - $description = getpaid_item_recurring_price_help_text( $this, $currency ); |
|
| 261 | + $description = getpaid_item_recurring_price_help_text($this, $currency); |
|
| 262 | 262 | |
| 263 | - if ( $description ) { |
|
| 263 | + if ($description) { |
|
| 264 | 264 | $description = "<div class='getpaid-subscription-help-text'>$description</div>"; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | return array( |
| 268 | 268 | 'id' => $this->get_id(), |
| 269 | 269 | 'texts' => array( |
| 270 | - 'item-name' => sanitize_text_field( $this->get_name() ), |
|
| 271 | - 'item-description' => wp_kses_post( $this->get_description() ) . $description, |
|
| 272 | - 'item-quantity' => absint( $this->get_quantity() ), |
|
| 273 | - 'item-price' => wpinv_price( wpinv_format_amount ( $this->get_price() ), $currency ), |
|
| 274 | - 'item-total' => wpinv_price( wpinv_format_amount( $this->get_sub_total() ), $currency ), |
|
| 270 | + 'item-name' => sanitize_text_field($this->get_name()), |
|
| 271 | + 'item-description' => wp_kses_post($this->get_description()) . $description, |
|
| 272 | + 'item-quantity' => absint($this->get_quantity()), |
|
| 273 | + 'item-price' => wpinv_price(wpinv_format_amount($this->get_price()), $currency), |
|
| 274 | + 'item-total' => wpinv_price(wpinv_format_amount($this->get_sub_total()), $currency), |
|
| 275 | 275 | ), |
| 276 | 276 | 'inputs' => array( |
| 277 | 277 | 'item-id' => $this->get_id(), |
| 278 | - 'item-name' => sanitize_text_field( $this->get_name() ), |
|
| 279 | - 'item-description' => wp_kses_post( $this->get_description() ), |
|
| 280 | - 'item-quantity' => absint( $this->get_quantity() ), |
|
| 278 | + 'item-name' => sanitize_text_field($this->get_name()), |
|
| 279 | + 'item-description' => wp_kses_post($this->get_description()), |
|
| 280 | + 'item-quantity' => absint($this->get_quantity()), |
|
| 281 | 281 | 'item-price' => $this->get_price(), |
| 282 | 282 | ) |
| 283 | 283 | ); |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | return array( |
| 296 | 296 | 'post_id' => $this->invoice_id, |
| 297 | 297 | 'item_id' => $this->get_id(), |
| 298 | - 'item_name' => sanitize_text_field( $this->get_raw_name() ), |
|
| 298 | + 'item_name' => sanitize_text_field($this->get_raw_name()), |
|
| 299 | 299 | 'item_description' => $this->get_description(), |
| 300 | 300 | 'tax' => $this->item_tax, |
| 301 | 301 | 'item_price' => $this->get_price(), |
@@ -324,9 +324,9 @@ discard block |
||
| 324 | 324 | * @since 1.0.19 |
| 325 | 325 | * @param int $quantity The item quantity. |
| 326 | 326 | */ |
| 327 | - public function set_quantity( $quantity ) { |
|
| 327 | + public function set_quantity($quantity) { |
|
| 328 | 328 | |
| 329 | - if ( empty( $quantity ) || ! is_numeric( $quantity ) ) { |
|
| 329 | + if (empty($quantity) || !is_numeric($quantity)) { |
|
| 330 | 330 | $quantity = 1; |
| 331 | 331 | } |
| 332 | 332 | |
@@ -340,8 +340,8 @@ discard block |
||
| 340 | 340 | * @since 1.0.19 |
| 341 | 341 | * @param array $meta The item meta data. |
| 342 | 342 | */ |
| 343 | - public function set_item_meta( $meta ) { |
|
| 344 | - $this->meta = maybe_unserialize( $meta ); |
|
| 343 | + public function set_item_meta($meta) { |
|
| 344 | + $this->meta = maybe_unserialize($meta); |
|
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | /** |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | * @since 1.0.19 |
| 351 | 351 | * @param bool $allow_quantities |
| 352 | 352 | */ |
| 353 | - public function set_allow_quantities( $allow_quantities ) { |
|
| 353 | + public function set_allow_quantities($allow_quantities) { |
|
| 354 | 354 | $this->allow_quantities = (bool) $allow_quantities; |
| 355 | 355 | } |
| 356 | 356 | |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | * @since 1.0.19 |
| 361 | 361 | * @param bool $is_required |
| 362 | 362 | */ |
| 363 | - public function set_is_required( $is_required ) { |
|
| 363 | + public function set_is_required($is_required) { |
|
| 364 | 364 | $this->is_required = (bool) $is_required; |
| 365 | 365 | } |
| 366 | 366 | |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | * @since 1.0.19 |
| 371 | 371 | * @param string $description |
| 372 | 372 | */ |
| 373 | - public function set_custom_description( $description ) { |
|
| 373 | + public function set_custom_description($description) { |
|
| 374 | 374 | $this->custom_description = $description; |
| 375 | 375 | } |
| 376 | 376 | |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | * |
| 380 | 380 | * @return int item id |
| 381 | 381 | */ |
| 382 | - public function save( $data = array() ) { |
|
| 382 | + public function save($data = array()) { |
|
| 383 | 383 | return $this->get_id(); |
| 384 | 384 | } |
| 385 | 385 | |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | -$watermark = wpinv_watermark( $invoice->get_id() ) |
|
| 12 | +$watermark = wpinv_watermark($invoice->get_id()) |
|
| 13 | 13 | |
| 14 | 14 | ?> |
| 15 | 15 | |
| 16 | - <?php do_action( 'getpaid_before_invoice_details_top', $invoice ); ?> |
|
| 16 | + <?php do_action('getpaid_before_invoice_details_top', $invoice); ?> |
|
| 17 | 17 | |
| 18 | - <?php if ( ! empty( $watermark ) ) : ?> |
|
| 18 | + <?php if (!empty($watermark)) : ?> |
|
| 19 | 19 | |
| 20 | 20 | <div class="getpaid-watermark no-print"> |
| 21 | - <p><?php echo sanitize_text_field( $watermark ) ?></p> |
|
| 21 | + <p><?php echo sanitize_text_field($watermark) ?></p> |
|
| 22 | 22 | </div> |
| 23 | 23 | |
| 24 | 24 | <?php endif; ?> |
@@ -26,15 +26,15 @@ discard block |
||
| 26 | 26 | <div class="getpaid-invoice-details-top mb-5"> |
| 27 | 27 | <div class="row"> |
| 28 | 28 | <div class="col-12 col-sm-6 text-left"> |
| 29 | - <?php do_action( 'getpaid_invoice_details_top_left', $invoice ); ?> |
|
| 29 | + <?php do_action('getpaid_invoice_details_top_left', $invoice); ?> |
|
| 30 | 30 | </div> |
| 31 | 31 | |
| 32 | 32 | <div class="col-12 col-sm-6 text-right"> |
| 33 | - <?php do_action( 'getpaid_invoice_details_top_right', $invoice ); ?> |
|
| 33 | + <?php do_action('getpaid_invoice_details_top_right', $invoice); ?> |
|
| 34 | 34 | </div> |
| 35 | 35 | </div> |
| 36 | 36 | </div> |
| 37 | 37 | |
| 38 | - <?php do_action( 'getpaid_after_invoice_details_top', $invoice ); ?> |
|
| 38 | + <?php do_action('getpaid_after_invoice_details_top', $invoice); ?> |
|
| 39 | 39 | |
| 40 | 40 | <?php |
@@ -7,51 +7,51 @@ |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | -$class = ! is_singular( 'page' ) ? 'table-sm' : ''; |
|
| 12 | +$class = !is_singular('page') ? 'table-sm' : ''; |
|
| 13 | 13 | ?> |
| 14 | 14 | |
| 15 | - <?php do_action( 'getpaid_before_invoice_meta', $invoice ); ?> |
|
| 15 | + <?php do_action('getpaid_before_invoice_meta', $invoice); ?> |
|
| 16 | 16 | <div class="getpaid-invoice-meta-data"> |
| 17 | 17 | |
| 18 | 18 | |
| 19 | - <?php do_action( 'getpaid_before_invoice_meta_table', $invoice ); ?> |
|
| 19 | + <?php do_action('getpaid_before_invoice_meta_table', $invoice); ?> |
|
| 20 | 20 | <table class="table <?php echo $class; ?> table-bordered"> |
| 21 | 21 | <tbody> |
| 22 | 22 | |
| 23 | - <?php do_action( "getpaid_before_invoice_meta_rows", $invoice ); ?> |
|
| 24 | - <?php foreach ( $meta as $key => $data ) : ?> |
|
| 23 | + <?php do_action("getpaid_before_invoice_meta_rows", $invoice); ?> |
|
| 24 | + <?php foreach ($meta as $key => $data) : ?> |
|
| 25 | 25 | |
| 26 | - <?php if ( ! empty( $data['value'] ) ) : ?> |
|
| 26 | + <?php if (!empty($data['value'])) : ?> |
|
| 27 | 27 | |
| 28 | - <?php do_action( "getpaid_before_invoice_meta_$key", $invoice, $data ); ?> |
|
| 28 | + <?php do_action("getpaid_before_invoice_meta_$key", $invoice, $data); ?> |
|
| 29 | 29 | |
| 30 | - <tr class="getpaid-invoice-meta-<?php echo sanitize_html_class( $key ); ?>"> |
|
| 30 | + <tr class="getpaid-invoice-meta-<?php echo sanitize_html_class($key); ?>"> |
|
| 31 | 31 | |
| 32 | 32 | <th> |
| 33 | - <?php echo sanitize_text_field( $data['label'] ); ?> |
|
| 33 | + <?php echo sanitize_text_field($data['label']); ?> |
|
| 34 | 34 | </th> |
| 35 | 35 | |
| 36 | 36 | <td> |
| 37 | - <span class="getpaid-invoice-meta-<?php echo sanitize_html_class( $key ); ?>-value"><?php echo wp_kses_post( $data['value'] ); ?></span> |
|
| 37 | + <span class="getpaid-invoice-meta-<?php echo sanitize_html_class($key); ?>-value"><?php echo wp_kses_post($data['value']); ?></span> |
|
| 38 | 38 | </td> |
| 39 | 39 | |
| 40 | 40 | </tr> |
| 41 | 41 | |
| 42 | - <?php do_action( "getpaid_after_invoice_meta_$key", $invoice, $data ); ?> |
|
| 42 | + <?php do_action("getpaid_after_invoice_meta_$key", $invoice, $data); ?> |
|
| 43 | 43 | |
| 44 | 44 | <?php endif; ?> |
| 45 | 45 | |
| 46 | 46 | <?php endforeach; ?> |
| 47 | - <?php do_action( "getpaid_after_invoice_meta_rows", $invoice ); ?> |
|
| 47 | + <?php do_action("getpaid_after_invoice_meta_rows", $invoice); ?> |
|
| 48 | 48 | |
| 49 | 49 | </tbody> |
| 50 | 50 | </table> |
| 51 | - <?php do_action( 'getpaid_after_invoice_meta_table', $invoice ); ?> |
|
| 51 | + <?php do_action('getpaid_after_invoice_meta_table', $invoice); ?> |
|
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | </div> |
| 55 | - <?php do_action( 'getpaid_after_invoice_meta', $invoice ); ?> |
|
| 55 | + <?php do_action('getpaid_after_invoice_meta', $invoice); ?> |
|
| 56 | 56 | |
| 57 | 57 | <?php |
@@ -7,35 +7,35 @@ |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | ?> |
| 13 | 13 | |
| 14 | 14 | <div class="getpaid-header-right-actions"> |
| 15 | 15 | |
| 16 | - <?php if ( $invoice->is_type( 'invoice' ) ) : ?> |
|
| 16 | + <?php if ($invoice->is_type('invoice')) : ?> |
|
| 17 | 17 | |
| 18 | 18 | <a class="btn btn-sm btn-secondary invoice-action-print" onclick="window.print();" href="javascript:void(0)"> |
| 19 | - <?php _e( 'Print Invoice', 'invoicing' ); ?> |
|
| 19 | + <?php _e('Print Invoice', 'invoicing'); ?> |
|
| 20 | 20 | </a> |
| 21 | 21 | |
| 22 | - <?php if ( is_user_logged_in() ) : ?> |
|
| 22 | + <?php if (is_user_logged_in()) : ?> |
|
| 23 | 23 | |
| 24 | - <a class="btn btn-sm btn-secondary invoice-action-history" href="<?php echo esc_url( wpinv_get_history_page_uri() ); ?>"> |
|
| 25 | - <?php _e( 'Invoice History', 'invoicing' ); ?> |
|
| 24 | + <a class="btn btn-sm btn-secondary invoice-action-history" href="<?php echo esc_url(wpinv_get_history_page_uri()); ?>"> |
|
| 25 | + <?php _e('Invoice History', 'invoicing'); ?> |
|
| 26 | 26 | </a> |
| 27 | 27 | <?php endif; ?> |
| 28 | 28 | |
| 29 | - <?php if ( wpinv_current_user_can_manage_invoicing() ) : ?> |
|
| 29 | + <?php if (wpinv_current_user_can_manage_invoicing()) : ?> |
|
| 30 | 30 | |
| 31 | - <a class="btn btn-sm btn-secondary invoice-action-edit" href="<?php echo esc_url( get_edit_post_link( $invoice->get_id() ) ); ?>"> |
|
| 32 | - <?php _e( 'Edit Invoice', 'invoicing' ); ?> |
|
| 31 | + <a class="btn btn-sm btn-secondary invoice-action-edit" href="<?php echo esc_url(get_edit_post_link($invoice->get_id())); ?>"> |
|
| 32 | + <?php _e('Edit Invoice', 'invoicing'); ?> |
|
| 33 | 33 | </a> |
| 34 | 34 | <?php endif; ?> |
| 35 | 35 | |
| 36 | 36 | <?php endif; ?> |
| 37 | 37 | |
| 38 | - <?php do_action('wpinv_invoice_display_right_actions', $invoice ); ?> |
|
| 38 | + <?php do_action('wpinv_invoice_display_right_actions', $invoice); ?> |
|
| 39 | 39 | </div> |
| 40 | 40 | |
| 41 | 41 | <?php |
@@ -9,9 +9,9 @@ discard block |
||
| 9 | 9 | * @var array $fee |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -defined( 'ABSPATH' ) || exit; |
|
| 12 | +defined('ABSPATH') || exit; |
|
| 13 | 13 | |
| 14 | -do_action( 'getpaid_before_invoice_fee_item', $invoice, $fee ); |
|
| 14 | +do_action('getpaid_before_invoice_fee_item', $invoice, $fee); |
|
| 15 | 15 | |
| 16 | 16 | ?> |
| 17 | 17 | |
@@ -19,61 +19,61 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | <div class="form-row"> |
| 21 | 21 | |
| 22 | - <?php foreach ( array_keys( $columns ) as $column ): ?> |
|
| 22 | + <?php foreach (array_keys($columns) as $column): ?> |
|
| 23 | 23 | |
| 24 | - <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class( $column ); ?>"> |
|
| 24 | + <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class($column); ?>"> |
|
| 25 | 25 | |
| 26 | 26 | <?php |
| 27 | 27 | |
| 28 | 28 | // Fires before printing a fee item column. |
| 29 | - do_action( "getpaid_invoice_fee_item_before_$column", $fee, $invoice ); |
|
| 29 | + do_action("getpaid_invoice_fee_item_before_$column", $fee, $invoice); |
|
| 30 | 30 | |
| 31 | 31 | // Item name. |
| 32 | - if ( 'name' == $column ) { |
|
| 32 | + if ('name' == $column) { |
|
| 33 | 33 | |
| 34 | 34 | // Display the name. |
| 35 | - echo '<div class="mb-1">' . sanitize_text_field( $fee['name'] ) . '</div>'; |
|
| 35 | + echo '<div class="mb-1">' . sanitize_text_field($fee['name']) . '</div>'; |
|
| 36 | 36 | |
| 37 | 37 | // And an optional description. |
| 38 | - $description = esc_html__( 'Fee', 'invoicing' ); |
|
| 38 | + $description = esc_html__('Fee', 'invoicing'); |
|
| 39 | 39 | echo "<small class='form-text text-muted pr-2 m-0'>$description</small>"; |
| 40 | 40 | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | // Item price. |
| 44 | - if ( 'price' == $column ) { |
|
| 44 | + if ('price' == $column) { |
|
| 45 | 45 | |
| 46 | 46 | // Display the item price (or recurring price if this is a renewal invoice) |
| 47 | - if ( $invoice->is_recurring() && $invoice->is_renewal() ) { |
|
| 48 | - echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() ); |
|
| 47 | + if ($invoice->is_recurring() && $invoice->is_renewal()) { |
|
| 48 | + echo wpinv_price($fee['recurring_fee'], $invoice->get_currency()); |
|
| 49 | 49 | } else { |
| 50 | - echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() ); |
|
| 50 | + echo wpinv_price($fee['initial_fee'], $invoice->get_currency()); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | // Item quantity. |
| 56 | - if ( 'quantity' == $column ) { |
|
| 56 | + if ('quantity' == $column) { |
|
| 57 | 57 | echo "—"; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | // Item sub total. |
| 61 | - if ( 'subtotal' == $column ) { |
|
| 61 | + if ('subtotal' == $column) { |
|
| 62 | 62 | |
| 63 | 63 | // Display the item price (or recurring price if this is a renewal invoice) |
| 64 | - if ( $invoice->is_recurring() && $invoice->is_renewal() ) { |
|
| 65 | - echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() ); |
|
| 64 | + if ($invoice->is_recurring() && $invoice->is_renewal()) { |
|
| 65 | + echo wpinv_price($fee['recurring_fee'], $invoice->get_currency()); |
|
| 66 | 66 | } else { |
| 67 | - echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() ); |
|
| 67 | + echo wpinv_price($fee['initial_fee'], $invoice->get_currency()); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | // Fires when printing a fee item column. |
| 73 | - do_action( "getpaid_invoice_fee_item_$column", $fee, $invoice ); |
|
| 73 | + do_action("getpaid_invoice_fee_item_$column", $fee, $invoice); |
|
| 74 | 74 | |
| 75 | 75 | // Fires after printing a fee item column. |
| 76 | - do_action( "getpaid_invoice_fee_item_after_$column", $fee, $invoice ); |
|
| 76 | + do_action("getpaid_invoice_fee_item_after_$column", $fee, $invoice); |
|
| 77 | 77 | |
| 78 | 78 | ?> |
| 79 | 79 | |
@@ -9,26 +9,26 @@ discard block |
||
| 9 | 9 | * @var WPInv_Invoice $invoice |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -defined( 'ABSPATH' ) || exit; |
|
| 12 | +defined('ABSPATH') || exit; |
|
| 13 | 13 | |
| 14 | 14 | // Totals rows. |
| 15 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
| 15 | +$totals = getpaid_invoice_totals_rows($invoice); |
|
| 16 | 16 | |
| 17 | -do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals ); |
|
| 17 | +do_action('getpaid_before_invoice_line_totals', $invoice, $totals); |
|
| 18 | 18 | |
| 19 | 19 | ?> |
| 20 | 20 | <div class='getpaid-invoice-line-totals'> |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-12 offset-sm-6 col-sm-6 border-left pl-0"> |
| 23 | 23 | |
| 24 | - <?php foreach ( $totals as $key => $label ) : ?> |
|
| 24 | + <?php foreach ($totals as $key => $label) : ?> |
|
| 25 | 25 | |
| 26 | - <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class( $key ); ?>"> |
|
| 26 | + <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class($key); ?>"> |
|
| 27 | 27 | |
| 28 | 28 | <div class="row"> |
| 29 | 29 | |
| 30 | 30 | <div class="col-12 col-sm-8 getpaid-invoice-line-totals-label"> |
| 31 | - <?php echo sanitize_text_field( $label ); ?> |
|
| 31 | + <?php echo sanitize_text_field($label); ?> |
|
| 32 | 32 | </div> |
| 33 | 33 | |
| 34 | 34 | <div class="col-12 col-sm-2 getpaid-invoice-line-totals-value"> |
@@ -36,32 +36,32 @@ discard block |
||
| 36 | 36 | <?php |
| 37 | 37 | |
| 38 | 38 | // Total tax. |
| 39 | - if ( 'tax' == $key ) { |
|
| 40 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_tax() ), $invoice->get_currency() ); |
|
| 39 | + if ('tax' == $key) { |
|
| 40 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_tax()), $invoice->get_currency()); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | // Total Fee. |
| 44 | - if ( 'fee' == $key ) { |
|
| 45 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_fees() ), $invoice->get_currency() ); |
|
| 44 | + if ('fee' == $key) { |
|
| 45 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_fees()), $invoice->get_currency()); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // Total discount. |
| 49 | - if ( 'discount' == $key ) { |
|
| 50 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_discount() ), $invoice->get_currency() ); |
|
| 49 | + if ('discount' == $key) { |
|
| 50 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_discount()), $invoice->get_currency()); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Sub total. |
| 54 | - if ( 'subtotal' == $key ) { |
|
| 55 | - echo wpinv_price( wpinv_format_amount( $invoice->get_subtotal() ), $invoice->get_currency() ); |
|
| 54 | + if ('subtotal' == $key) { |
|
| 55 | + echo wpinv_price(wpinv_format_amount($invoice->get_subtotal()), $invoice->get_currency()); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | // Total. |
| 59 | - if ( 'total' == $key ) { |
|
| 60 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total() ), $invoice->get_currency() ); |
|
| 59 | + if ('total' == $key) { |
|
| 60 | + echo wpinv_price(wpinv_format_amount($invoice->get_total()), $invoice->get_currency()); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | // Fires when printing a cart total. |
| 64 | - do_action( "getpaid_invoice_cart_totals_$key", $invoice ); |
|
| 64 | + do_action("getpaid_invoice_cart_totals_$key", $invoice); |
|
| 65 | 65 | |
| 66 | 66 | ?> |
| 67 | 67 | |
@@ -75,4 +75,4 @@ discard block |
||
| 75 | 75 | </div> |
| 76 | 76 | </div> <!-- end .getpaid-invoice-line-totals --> |
| 77 | 77 | |
| 78 | -<?php do_action( 'getpaid_after_invoice_line_totals', $invoice, $totals ); ?> |
|
| 78 | +<?php do_action('getpaid_after_invoice_line_totals', $invoice, $totals); ?> |
|