@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | |
515 | 515 | $response['success'] = true; |
516 | 516 | $response['msg'] = __( 'Discount has been applied successfully.', 'invoicing' ); |
517 | - } else { |
|
517 | + } else { |
|
518 | 518 | $errors = wpinv_get_errors(); |
519 | 519 | if ( !empty( $errors['wpinv-discount-error'] ) ) { |
520 | 520 | $response['msg'] = $errors['wpinv-discount-error']; |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | wp_send_json(array( |
705 | 705 | 'success' => wp_login_url( wp_get_referer() ) |
706 | 706 | )); |
707 | - }else{ |
|
707 | + } else{ |
|
708 | 708 | |
709 | 709 | // only check nonce if logged in as it could be cached when logged out. |
710 | 710 | if ( ! isset( $_POST['wpinv_buy_nonce'] ) || ! wp_verify_nonce( $_POST['wpinv_buy_nonce'], 'wpinv_buy_items' ) ) { |
@@ -840,13 +840,13 @@ discard block |
||
840 | 840 | 'success' => $invoice->get_checkout_payment_url() |
841 | 841 | )); |
842 | 842 | |
843 | - }else{ |
|
843 | + } else{ |
|
844 | 844 | wp_send_json(array( |
845 | 845 | 'error' => __('Invoice failed to create','invoicing') |
846 | 846 | )); |
847 | 847 | } |
848 | 848 | |
849 | - }else{ |
|
849 | + } else{ |
|
850 | 850 | wp_send_json(array( |
851 | 851 | 'error' => __('Items not valid.','invoicing') |
852 | 852 | )); |