@@ -169,8 +169,9 @@ discard block |
||
169 | 169 | |
170 | 170 | // Setup possible parts |
171 | 171 | $templates = array(); |
172 | - if ( isset( $name ) ) |
|
173 | - $templates[] = $slug . '-' . $name . '.php'; |
|
172 | + if ( isset( $name ) ) { |
|
173 | + $templates[] = $slug . '-' . $name . '.php'; |
|
174 | + } |
|
174 | 175 | $templates[] = $slug . '.php'; |
175 | 176 | |
176 | 177 | // Allow template parts to be filtered |
@@ -188,8 +189,9 @@ discard block |
||
188 | 189 | foreach ( (array)$template_names as $template_name ) { |
189 | 190 | |
190 | 191 | // Continue if template is empty |
191 | - if ( empty( $template_name ) ) |
|
192 | - continue; |
|
192 | + if ( empty( $template_name ) ) { |
|
193 | + continue; |
|
194 | + } |
|
193 | 195 | |
194 | 196 | // Trim off any slashes from the template name |
195 | 197 | $template_name = ltrim( $template_name, '/' ); |
@@ -208,8 +210,9 @@ discard block |
||
208 | 210 | } |
209 | 211 | } |
210 | 212 | |
211 | - if ( ( true == $load ) && ! empty( $located ) ) |
|
212 | - load_template( $located, $require_once ); |
|
213 | + if ( ( true == $load ) && ! empty( $located ) ) { |
|
214 | + load_template( $located, $require_once ); |
|
215 | + } |
|
213 | 216 | |
214 | 217 | return $located; |
215 | 218 | } |
@@ -285,8 +288,9 @@ discard block |
||
285 | 288 | function wpinv_html_dropdown( $name = 'wpinv_discounts', $selected = 0, $status = '' ) { |
286 | 289 | $args = array( 'nopaging' => true ); |
287 | 290 | |
288 | - if ( ! empty( $status ) ) |
|
289 | - $args['post_status'] = $status; |
|
291 | + if ( ! empty( $status ) ) { |
|
292 | + $args['post_status'] = $status; |
|
293 | + } |
|
290 | 294 | |
291 | 295 | $discounts = wpinv_get_discounts( $args ); |
292 | 296 | $options = array(); |
@@ -893,8 +897,11 @@ discard block |
||
893 | 897 | |
894 | 898 | $invoice_status = wpinv_get_invoice_status( $invoice_id ); |
895 | 899 | |
896 | - if($invoice->post_type == 'wpi_invoice') $type = 'Invoice'; |
|
897 | - elseif($invoice->post_type == 'wpi_quote') $type = 'Quote'; |
|
900 | + if($invoice->post_type == 'wpi_invoice') { |
|
901 | + $type = 'Invoice'; |
|
902 | + } elseif($invoice->post_type == 'wpi_quote') { |
|
903 | + $type = 'Quote'; |
|
904 | + } |
|
898 | 905 | ?> |
899 | 906 | <table class="table table-bordered table-sm"> |
900 | 907 | <?php if ( $invoice_number = wpinv_get_invoice_number( $invoice_id ) ) { ?> |
@@ -1461,17 +1468,19 @@ discard block |
||
1461 | 1468 | add_action( 'wpinv_cart_empty', 'wpinv_empty_checkout_cart' ); |
1462 | 1469 | |
1463 | 1470 | function wpinv_save_cart_button() { |
1464 | - if ( wpinv_is_cart_saving_disabled() ) |
|
1465 | - return; |
|
1466 | -?> |
|
1471 | + if ( wpinv_is_cart_saving_disabled() ) { |
|
1472 | + return; |
|
1473 | + } |
|
1474 | + ?> |
|
1467 | 1475 | <a class="wpinv-cart-saving-button wpinv-submit button" id="wpinv-save-cart-button" href="<?php echo esc_url( add_query_arg( 'wpi_action', 'save_cart' ) ); ?>"><?php _e( 'Save Cart', 'invoicing' ); ?></a> |
1468 | 1476 | <?php |
1469 | 1477 | } |
1470 | 1478 | |
1471 | 1479 | function wpinv_update_cart_button() { |
1472 | - if ( !wpinv_item_quantities_enabled() ) |
|
1473 | - return; |
|
1474 | -?> |
|
1480 | + if ( !wpinv_item_quantities_enabled() ) { |
|
1481 | + return; |
|
1482 | + } |
|
1483 | + ?> |
|
1475 | 1484 | <input type="submit" name="wpinv_update_cart_submit" class="wpinv-submit wpinv-no-js button" value="<?php _e( 'Update Cart', 'invoicing' ); ?>"/> |
1476 | 1485 | <input type="hidden" name="wpi_action" value="update_cart"/> |
1477 | 1486 | <?php |
@@ -1612,7 +1621,7 @@ discard block |
||
1612 | 1621 | </div> |
1613 | 1622 | <?php |
1614 | 1623 | } |
1615 | - }else{ |
|
1624 | + } else{ |
|
1616 | 1625 | echo '<div class="alert alert-warning">'. __('No payment gateway active','invoicing') .'</div>'; |
1617 | 1626 | } |
1618 | 1627 |