Passed
Push — master ( 12e336...bef24b )
by Brian
04:19
created
includes/class-wpinv-notes.php 2 patches
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -12,119 +12,119 @@
 block discarded – undo
12 12
  */
13 13
 class WPInv_Notes {
14 14
 
15
-	/**
16
-	 * Class constructor.
17
-	 */
18
-	public function __construct() {
19
-
20
-		// Filter inovice notes.
21
-		add_action( 'pre_get_comments', array( $this, 'set_invoice_note_type' ), 11, 1 );
22
-		add_action( 'comment_feed_where', array( $this, 'wpinv_comment_feed_where' ), 10, 1 );
23
-
24
-		// Fires after notes are loaded.
25
-		do_action( 'wpinv_notes_init', $this );
26
-	}
27
-
28
-	/**
29
-	 * Filters invoice notes query to only include our notes.
30
-	 *
31
-	 * @param WP_Comment_Query $query
32
-	 */
33
-	public function set_invoice_note_type( $query ) {
34
-		$post_id = ! empty( $query->query_vars['post_ID'] ) ? $query->query_vars['post_ID'] : $query->query_vars['post_id'];
35
-
36
-		if ( $post_id && getpaid_is_invoice_post_type( get_post_type( $post_id ) ) ) {
37
-			$query->query_vars['type'] = 'wpinv_note';
38
-		} else {
39
-
40
-			if ( empty( $query->query_vars['type__not_in'] ) ) {
41
-				$query->query_vars['type__not_in'] = array();
42
-			}
43
-
44
-			$query->query_vars['type__not_in'] = wpinv_parse_list( $query->query_vars['type__not_in'] );
45
-			$query->query_vars['type__not_in'] = array_merge( array( 'wpinv_note' ), $query->query_vars['type__not_in'] );
46
-		}
47
-
48
-		return $query;
49
-	}
50
-
51
-	/**
52
-	 * Exclude notes from the comments feed.
53
-	 */
54
-	function wpinv_comment_feed_where( $where ){
55
-		return $where . ( $where ? ' AND ' : '' ) . " comment_type != 'wpinv_note' ";
56
-	}
57
-
58
-	/**
59
-	 * Returns an array of invoice notes.
60
-	 *
61
-	 * @param int $invoice_id The invoice ID whose notes to retrieve.
62
-	 * @param string $type Optional. Pass in customer to only return customer notes.
63
-	 * @return WP_Comment[]
64
-	 */
65
-	public function get_invoice_notes( $invoice_id = 0, $type = 'all' ) {
66
-
67
-		// Default comment args.
68
-		$args = array(
69
-			'post_id'   => $invoice_id,
70
-			'orderby'   => 'comment_ID',
71
-			'order'     => 'ASC',
72
-		);
73
-
74
-		// Maybe only show customer comments.
75
-		if ( $type == 'customer' ) {
76
-			$args['meta_key']   = '_wpi_customer_note';
77
-			$args['meta_value'] = 1;
78
-		}
79
-
80
-		$args = apply_filters( 'wpinv_invoice_notes_args', $args, $this, $invoice_id, $type );
81
-
82
-		return get_comments( $args );
83
-	}
84
-
85
-	/**
86
-	 * Saves an invoice comment.
87
-	 * 
88
-	 * @param WPInv_Invoice $invoice The invoice to add the comment to.
89
-	 * @param string $note The note content.
90
-	 * @param string $note_author The name of the author of the note.
91
-	 * @param bool $for_customer Whether or not this comment is meant to be sent to the customer.
92
-	 * @return int|false The new note's ID on success, false on failure.
93
-	 */
94
-	function add_invoice_note( $invoice, $note, $note_author, $author_email, $for_customer = false ){
95
-
96
-		do_action( 'wpinv_pre_insert_invoice_note', $invoice->get_id(), $note, $for_customer );
97
-
98
-		/**
99
-		 * Insert the comment.
100
-		 */
101
-		$note_id = wp_insert_comment(
102
-			wp_filter_comment(
103
-				array(
104
-					'comment_post_ID'      => $invoice->get_id(),
105
-					'comment_content'      => $note,
106
-					'comment_agent'        => 'Invoicing',
107
-					'user_id'              => get_current_user_id(),
108
-					'comment_author'       => $note_author,
109
-					'comment_author_IP'    => wpinv_get_ip(),
110
-					'comment_author_email' => $author_email,
111
-					'comment_author_url'   => $invoice->get_view_url(),
112
-					'comment_type'         => 'wpinv_note',
113
-				)
114
-			)
115
-		);
116
-
117
-		do_action( 'wpinv_insert_payment_note', $note_id, $invoice->get_id(), $note, $for_customer );
118
-
119
-		// Are we notifying the customer?
120
-		if ( empty( $note_id ) || empty( $for_customer ) ) {
121
-			return $note_id;
122
-		}
123
-
124
-		add_comment_meta( $note_id, '_wpi_customer_note', 1 );
125
-		do_action( 'wpinv_new_customer_note', array( 'invoice_id' => $invoice->get_id(), 'user_note' => $note ) );
126
-		do_action( 'getpaid_new_customer_note', $invoice, $note );
127
-		return $note_id;
128
-	}
15
+    /**
16
+     * Class constructor.
17
+     */
18
+    public function __construct() {
19
+
20
+        // Filter inovice notes.
21
+        add_action( 'pre_get_comments', array( $this, 'set_invoice_note_type' ), 11, 1 );
22
+        add_action( 'comment_feed_where', array( $this, 'wpinv_comment_feed_where' ), 10, 1 );
23
+
24
+        // Fires after notes are loaded.
25
+        do_action( 'wpinv_notes_init', $this );
26
+    }
27
+
28
+    /**
29
+     * Filters invoice notes query to only include our notes.
30
+     *
31
+     * @param WP_Comment_Query $query
32
+     */
33
+    public function set_invoice_note_type( $query ) {
34
+        $post_id = ! empty( $query->query_vars['post_ID'] ) ? $query->query_vars['post_ID'] : $query->query_vars['post_id'];
35
+
36
+        if ( $post_id && getpaid_is_invoice_post_type( get_post_type( $post_id ) ) ) {
37
+            $query->query_vars['type'] = 'wpinv_note';
38
+        } else {
39
+
40
+            if ( empty( $query->query_vars['type__not_in'] ) ) {
41
+                $query->query_vars['type__not_in'] = array();
42
+            }
43
+
44
+            $query->query_vars['type__not_in'] = wpinv_parse_list( $query->query_vars['type__not_in'] );
45
+            $query->query_vars['type__not_in'] = array_merge( array( 'wpinv_note' ), $query->query_vars['type__not_in'] );
46
+        }
47
+
48
+        return $query;
49
+    }
50
+
51
+    /**
52
+     * Exclude notes from the comments feed.
53
+     */
54
+    function wpinv_comment_feed_where( $where ){
55
+        return $where . ( $where ? ' AND ' : '' ) . " comment_type != 'wpinv_note' ";
56
+    }
57
+
58
+    /**
59
+     * Returns an array of invoice notes.
60
+     *
61
+     * @param int $invoice_id The invoice ID whose notes to retrieve.
62
+     * @param string $type Optional. Pass in customer to only return customer notes.
63
+     * @return WP_Comment[]
64
+     */
65
+    public function get_invoice_notes( $invoice_id = 0, $type = 'all' ) {
66
+
67
+        // Default comment args.
68
+        $args = array(
69
+            'post_id'   => $invoice_id,
70
+            'orderby'   => 'comment_ID',
71
+            'order'     => 'ASC',
72
+        );
73
+
74
+        // Maybe only show customer comments.
75
+        if ( $type == 'customer' ) {
76
+            $args['meta_key']   = '_wpi_customer_note';
77
+            $args['meta_value'] = 1;
78
+        }
79
+
80
+        $args = apply_filters( 'wpinv_invoice_notes_args', $args, $this, $invoice_id, $type );
81
+
82
+        return get_comments( $args );
83
+    }
84
+
85
+    /**
86
+     * Saves an invoice comment.
87
+     * 
88
+     * @param WPInv_Invoice $invoice The invoice to add the comment to.
89
+     * @param string $note The note content.
90
+     * @param string $note_author The name of the author of the note.
91
+     * @param bool $for_customer Whether or not this comment is meant to be sent to the customer.
92
+     * @return int|false The new note's ID on success, false on failure.
93
+     */
94
+    function add_invoice_note( $invoice, $note, $note_author, $author_email, $for_customer = false ){
95
+
96
+        do_action( 'wpinv_pre_insert_invoice_note', $invoice->get_id(), $note, $for_customer );
97
+
98
+        /**
99
+         * Insert the comment.
100
+         */
101
+        $note_id = wp_insert_comment(
102
+            wp_filter_comment(
103
+                array(
104
+                    'comment_post_ID'      => $invoice->get_id(),
105
+                    'comment_content'      => $note,
106
+                    'comment_agent'        => 'Invoicing',
107
+                    'user_id'              => get_current_user_id(),
108
+                    'comment_author'       => $note_author,
109
+                    'comment_author_IP'    => wpinv_get_ip(),
110
+                    'comment_author_email' => $author_email,
111
+                    'comment_author_url'   => $invoice->get_view_url(),
112
+                    'comment_type'         => 'wpinv_note',
113
+                )
114
+            )
115
+        );
116
+
117
+        do_action( 'wpinv_insert_payment_note', $note_id, $invoice->get_id(), $note, $for_customer );
118
+
119
+        // Are we notifying the customer?
120
+        if ( empty( $note_id ) || empty( $for_customer ) ) {
121
+            return $note_id;
122
+        }
123
+
124
+        add_comment_meta( $note_id, '_wpi_customer_note', 1 );
125
+        do_action( 'wpinv_new_customer_note', array( 'invoice_id' => $invoice->get_id(), 'user_note' => $note ) );
126
+        do_action( 'getpaid_new_customer_note', $invoice, $note );
127
+        return $note_id;
128
+    }
129 129
 
130 130
 }
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  *
5 5
  */
6 6
 
7
-defined( 'ABSPATH' ) || exit;
7
+defined('ABSPATH') || exit;
8 8
 
9 9
 /**
10 10
  * Handles invoice notes.
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 	public function __construct() {
19 19
 
20 20
 		// Filter inovice notes.
21
-		add_action( 'pre_get_comments', array( $this, 'set_invoice_note_type' ), 11, 1 );
22
-		add_action( 'comment_feed_where', array( $this, 'wpinv_comment_feed_where' ), 10, 1 );
21
+		add_action('pre_get_comments', array($this, 'set_invoice_note_type'), 11, 1);
22
+		add_action('comment_feed_where', array($this, 'wpinv_comment_feed_where'), 10, 1);
23 23
 
24 24
 		// Fires after notes are loaded.
25
-		do_action( 'wpinv_notes_init', $this );
25
+		do_action('wpinv_notes_init', $this);
26 26
 	}
27 27
 
28 28
 	/**
@@ -30,19 +30,19 @@  discard block
 block discarded – undo
30 30
 	 *
31 31
 	 * @param WP_Comment_Query $query
32 32
 	 */
33
-	public function set_invoice_note_type( $query ) {
34
-		$post_id = ! empty( $query->query_vars['post_ID'] ) ? $query->query_vars['post_ID'] : $query->query_vars['post_id'];
33
+	public function set_invoice_note_type($query) {
34
+		$post_id = !empty($query->query_vars['post_ID']) ? $query->query_vars['post_ID'] : $query->query_vars['post_id'];
35 35
 
36
-		if ( $post_id && getpaid_is_invoice_post_type( get_post_type( $post_id ) ) ) {
36
+		if ($post_id && getpaid_is_invoice_post_type(get_post_type($post_id))) {
37 37
 			$query->query_vars['type'] = 'wpinv_note';
38 38
 		} else {
39 39
 
40
-			if ( empty( $query->query_vars['type__not_in'] ) ) {
40
+			if (empty($query->query_vars['type__not_in'])) {
41 41
 				$query->query_vars['type__not_in'] = array();
42 42
 			}
43 43
 
44
-			$query->query_vars['type__not_in'] = wpinv_parse_list( $query->query_vars['type__not_in'] );
45
-			$query->query_vars['type__not_in'] = array_merge( array( 'wpinv_note' ), $query->query_vars['type__not_in'] );
44
+			$query->query_vars['type__not_in'] = wpinv_parse_list($query->query_vars['type__not_in']);
45
+			$query->query_vars['type__not_in'] = array_merge(array('wpinv_note'), $query->query_vars['type__not_in']);
46 46
 		}
47 47
 
48 48
 		return $query;
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 	/**
52 52
 	 * Exclude notes from the comments feed.
53 53
 	 */
54
-	function wpinv_comment_feed_where( $where ){
55
-		return $where . ( $where ? ' AND ' : '' ) . " comment_type != 'wpinv_note' ";
54
+	function wpinv_comment_feed_where($where) {
55
+		return $where . ($where ? ' AND ' : '') . " comment_type != 'wpinv_note' ";
56 56
 	}
57 57
 
58 58
 	/**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * @param string $type Optional. Pass in customer to only return customer notes.
63 63
 	 * @return WP_Comment[]
64 64
 	 */
65
-	public function get_invoice_notes( $invoice_id = 0, $type = 'all' ) {
65
+	public function get_invoice_notes($invoice_id = 0, $type = 'all') {
66 66
 
67 67
 		// Default comment args.
68 68
 		$args = array(
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
 		);
73 73
 
74 74
 		// Maybe only show customer comments.
75
-		if ( $type == 'customer' ) {
75
+		if ($type == 'customer') {
76 76
 			$args['meta_key']   = '_wpi_customer_note';
77 77
 			$args['meta_value'] = 1;
78 78
 		}
79 79
 
80
-		$args = apply_filters( 'wpinv_invoice_notes_args', $args, $this, $invoice_id, $type );
80
+		$args = apply_filters('wpinv_invoice_notes_args', $args, $this, $invoice_id, $type);
81 81
 
82
-		return get_comments( $args );
82
+		return get_comments($args);
83 83
 	}
84 84
 
85 85
 	/**
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
 	 * @param bool $for_customer Whether or not this comment is meant to be sent to the customer.
92 92
 	 * @return int|false The new note's ID on success, false on failure.
93 93
 	 */
94
-	function add_invoice_note( $invoice, $note, $note_author, $author_email, $for_customer = false ){
94
+	function add_invoice_note($invoice, $note, $note_author, $author_email, $for_customer = false) {
95 95
 
96
-		do_action( 'wpinv_pre_insert_invoice_note', $invoice->get_id(), $note, $for_customer );
96
+		do_action('wpinv_pre_insert_invoice_note', $invoice->get_id(), $note, $for_customer);
97 97
 
98 98
 		/**
99 99
 		 * Insert the comment.
@@ -114,16 +114,16 @@  discard block
 block discarded – undo
114 114
 			)
115 115
 		);
116 116
 
117
-		do_action( 'wpinv_insert_payment_note', $note_id, $invoice->get_id(), $note, $for_customer );
117
+		do_action('wpinv_insert_payment_note', $note_id, $invoice->get_id(), $note, $for_customer);
118 118
 
119 119
 		// Are we notifying the customer?
120
-		if ( empty( $note_id ) || empty( $for_customer ) ) {
120
+		if (empty($note_id) || empty($for_customer)) {
121 121
 			return $note_id;
122 122
 		}
123 123
 
124
-		add_comment_meta( $note_id, '_wpi_customer_note', 1 );
125
-		do_action( 'wpinv_new_customer_note', array( 'invoice_id' => $invoice->get_id(), 'user_note' => $note ) );
126
-		do_action( 'getpaid_new_customer_note', $invoice, $note );
124
+		add_comment_meta($note_id, '_wpi_customer_note', 1);
125
+		do_action('wpinv_new_customer_note', array('invoice_id' => $invoice->get_id(), 'user_note' => $note));
126
+		do_action('getpaid_new_customer_note', $invoice, $note);
127 127
 		return $note_id;
128 128
 	}
129 129
 
Please login to merge, or discard this patch.
templates/emails/wpinv-email-onhold_invoice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
13
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
14 14
 
15 15
 // Generate the custom message body.
16 16
 echo $message_body;
17 17
 
18 18
 // Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
19
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
20 20
 
21 21
 // Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
22
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
23 23
 
24 24
 // Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
25
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
26 26
 
27 27
 // Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
28
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
Please login to merge, or discard this patch.
templates/emails/wpinv-email-processing_invoice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
13
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
14 14
 
15 15
 // Generate the custom message body.
16 16
 echo $message_body;
17 17
 
18 18
 // Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
19
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
20 20
 
21 21
 // Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
22
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
23 23
 
24 24
 // Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
25
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
26 26
 
27 27
 // Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
28
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
Please login to merge, or discard this patch.
templates/emails/wpinv-email-new_invoice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
13
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
14 14
 
15 15
 // Generate the custom message body.
16 16
 echo $message_body;
17 17
 
18 18
 // Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
19
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
20 20
 
21 21
 // Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
22
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
23 23
 
24 24
 // Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
25
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
26 26
 
27 27
 // Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
28
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
Please login to merge, or discard this patch.
templates/emails/wpinv-email-completed_invoice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
13
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
14 14
 
15 15
 // Generate the custom message body.
16 16
 echo $message_body;
17 17
 
18 18
 // Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
19
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
20 20
 
21 21
 // Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
22
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
23 23
 
24 24
 // Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
25
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
26 26
 
27 27
 // Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
28
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
Please login to merge, or discard this patch.
templates/emails/wpinv-email-user_invoice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
13
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
14 14
 
15 15
 // Generate the custom message body.
16 16
 echo $message_body;
17 17
 
18 18
 // Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
19
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
20 20
 
21 21
 // Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
22
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
23 23
 
24 24
 // Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
25
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
26 26
 
27 27
 // Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
28
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
Please login to merge, or discard this patch.
templates/emails/wpinv-email-cancelled_invoice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
13
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
14 14
 
15 15
 // Generate the custom message body.
16 16
 echo $message_body;
17 17
 
18 18
 // Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
19
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
20 20
 
21 21
 // Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
22
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
23 23
 
24 24
 // Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
25
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
26 26
 
27 27
 // Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
28
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
Please login to merge, or discard this patch.
templates/emails/wpinv-email-refunded_invoice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
13
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
14 14
 
15 15
 // Generate the custom message body.
16 16
 echo $message_body;
17 17
 
18 18
 // Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
19
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
20 20
 
21 21
 // Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
22
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
23 23
 
24 24
 // Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
25
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
26 26
 
27 27
 // Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
28
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
Please login to merge, or discard this patch.
templates/emails/wpinv-email-failed_invoice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
13
+do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin);
14 14
 
15 15
 // Generate the custom message body.
16 16
 echo $message_body;
17 17
 
18 18
 // Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
19
+do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin);
20 20
 
21 21
 // Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
22
+do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin);
23 23
 
24 24
 // Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
25
+do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin);
26 26
 
27 27
 // Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
28
+do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin);
Please login to merge, or discard this patch.