Completed
Branch 2.0.0 (fb6d70)
by Jimmy
02:28
created
modules/doli-sync/view/sync-header.view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19
-<div class="table-cell table-100"><?php esc_html_e( 'Synchro', 'wpshop' ); ?></div>
19
+<div class="table-cell table-100"><?php esc_html_e('Synchro', 'wpshop'); ?></div>
Please login to merge, or discard this patch.
modules/payment/class/class-payment.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
18 18
 
19 19
 /**
20 20
  * Payement Class.
@@ -49,53 +49,53 @@  discard block
 block discarded – undo
49 49
 			'cheque'          => array(
50 50
 				'active'      => true,
51 51
 				'logo'        => '<i class="fas fa-money-check"></i>',
52
-				'title'       => __( 'Cheque', 'wpshop' ),
53
-				'description' => __( 'Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.', 'wpshop' ),
52
+				'title'       => __('Cheque', 'wpshop'),
53
+				'description' => __('Please send a check to Store Name, Store Street, Store Town, Store State / County, Store Postcode.', 'wpshop'),
54 54
 
55 55
 			),
56 56
 			'payment_in_shop' => array(
57 57
 				'active'      => true,
58 58
 				'logo'        => '<i class="fas fa-money-bill-alt"></i>',
59
-				'title'       => __( 'Payment in shop', 'wpshop' ),
60
-				'description' => __( 'Pay and pick up directly your products at the shop.', 'wpshop' ),
59
+				'title'       => __('Payment in shop', 'wpshop'),
60
+				'description' => __('Pay and pick up directly your products at the shop.', 'wpshop'),
61 61
 			),
62 62
 			'paypal'          => array(
63 63
 				'active'             => true,
64 64
 				'logo'               => '<i class="fab fa-paypal"></i>',
65
-				'title'              => __( 'PayPal', 'wpshop' ),
66
-				'description'        => __( 'Accept payments via PayPal using account balance or credit card.', 'wpshop' ),
65
+				'title'              => __('PayPal', 'wpshop'),
66
+				'description'        => __('Accept payments via PayPal using account balance or credit card.', 'wpshop'),
67 67
 				'paypal_email'       => '',
68 68
 				'use_paypal_sandbox' => false,
69 69
 			),
70 70
 			'stripe'          => array(
71 71
 				'active'             => true,
72 72
 				'logo'               => '<i class="fab fa-stripe"></i>',
73
-				'title'              => __( 'Stripe', 'wpshop' ),
74
-				'description'        => __( 'Use your credit card to place your order', 'wpshop' ),
73
+				'title'              => __('Stripe', 'wpshop'),
74
+				'description'        => __('Use your credit card to place your order', 'wpshop'),
75 75
 				'publish_key'        => '',
76 76
 				'secret_key'         => '',
77 77
 				'use_stripe_sandbox' => false,
78 78
 			),
79 79
 		);
80 80
 
81
-		$this->default_options = apply_filters( 'wps_payment_methods', $this->default_options );
81
+		$this->default_options = apply_filters('wps_payment_methods', $this->default_options);
82 82
 
83 83
 		$this->status = array(
84 84
 			'cheque'          => array(
85
-				'publish' => __( 'Waiting for the check', 'wpshop' ),
86
-				'billed'  => __( 'Paid', 'wpshop' ),
85
+				'publish' => __('Waiting for the check', 'wpshop'),
86
+				'billed'  => __('Paid', 'wpshop'),
87 87
 			),
88 88
 			'payment_in_shop' => array(
89
-				'publish' => __( 'Waiting for the payment', 'wpshop' ),
90
-				'billed'  => __( 'Paid', 'wpshop' ),
89
+				'publish' => __('Waiting for the payment', 'wpshop'),
90
+				'billed'  => __('Paid', 'wpshop'),
91 91
 			),
92 92
 			'paypal'          => array(
93
-				'publish' => __( 'Waiting for the payment', 'wpshop' ),
94
-				'billed'  => __( 'Paid', 'wpshop' ),
93
+				'publish' => __('Waiting for the payment', 'wpshop'),
94
+				'billed'  => __('Paid', 'wpshop'),
95 95
 			),
96 96
 			'stripe'          => array(
97
-				'publish' => __( 'Waiting for the payment', 'wpshop' ),
98
-				'billed'  => __( 'Paid', 'wpshop' ),
97
+				'publish' => __('Waiting for the payment', 'wpshop'),
98
+				'billed'  => __('Paid', 'wpshop'),
99 99
 			),
100 100
 		);
101 101
 	}
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
 	 *
110 110
 	 * @return array        Les données de la méthode de paiement.
111 111
 	 */
112
-	public function get_payment_option( $slug = '' ) {
113
-		$payment_methods_option = get_option( 'wps_payment_methods', $this->default_options );
112
+	public function get_payment_option($slug = '') {
113
+		$payment_methods_option = get_option('wps_payment_methods', $this->default_options);
114 114
 
115
-		if ( empty( $slug ) || ! isset( $payment_methods_option[ $slug ] ) ) {
115
+		if (empty($slug) || !isset($payment_methods_option[$slug])) {
116 116
 			return $payment_methods_option;
117 117
 		}
118 118
 
119
-		return $payment_methods_option[ $slug ];
119
+		return $payment_methods_option[$slug];
120 120
 	}
121 121
 
122 122
 	/**
@@ -128,15 +128,15 @@  discard block
 block discarded – undo
128 128
 	 *
129 129
 	 * @return array        Le titre de la méthode de paiement.
130 130
 	 */
131
-	public function get_payment_title( $slug ) {
132
-		$payment_methods_option = get_option( 'wps_payment_methods', $this->default_options );
133
-		$payment_method         = ! empty( $payment_methods_option[ $slug ] ) ? $payment_methods_option[ $slug ] : null;
131
+	public function get_payment_title($slug) {
132
+		$payment_methods_option = get_option('wps_payment_methods', $this->default_options);
133
+		$payment_method         = !empty($payment_methods_option[$slug]) ? $payment_methods_option[$slug] : null;
134 134
 
135
-		if ( empty( $payment_method ) ) {
135
+		if (empty($payment_method)) {
136 136
 			return '-';
137 137
 		}
138 138
 
139
-		return ! empty( $payment_method['title'] ) ? $payment_method['title'] : '-';
139
+		return !empty($payment_method['title']) ? $payment_method['title'] : '-';
140 140
 	}
141 141
 
142 142
 	/**
@@ -149,20 +149,20 @@  discard block
 block discarded – undo
149 149
 	 *
150 150
 	 * @return string        Le status lisible.
151 151
 	 */
152
-	public function make_readable_statut( $object ) {
153
-		if ( empty( $object ) || empty( $object->data['payment_method'] ) ) {
152
+	public function make_readable_statut($object) {
153
+		if (empty($object) || empty($object->data['payment_method'])) {
154 154
 			return '-';
155 155
 		}
156 156
 
157
-		if ( empty( $this->status[ $object->data['payment_method'] ] ) ) {
157
+		if (empty($this->status[$object->data['payment_method']])) {
158 158
 			return '-';
159 159
 		}
160 160
 
161
-		if ( ( isset( $object->data['billed'] ) && 1 === $object->data['billed'] ) ||
162
-			( isset( $object->data['paye'] ) && 1 === $object->data['paye'] ) ) {
163
-			return $this->status[ $object->data['payment_method'] ]['billed'];
161
+		if ((isset($object->data['billed']) && 1 === $object->data['billed']) ||
162
+			(isset($object->data['paye']) && 1 === $object->data['paye'])) {
163
+			return $this->status[$object->data['payment_method']]['billed'];
164 164
 		} else {
165
-			return $this->status[ $object->data['payment_method'] ]['publish'];
165
+			return $this->status[$object->data['payment_method']]['publish'];
166 166
 		}
167 167
 
168 168
 		return '-';
Please login to merge, or discard this patch.
modules/doli-order/view/list.view.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -14,25 +14,25 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19 19
 <div class="wps-list-product wpeo-table table-flex table-7">
20 20
 	<div class="table-row table-header">
21
-		<div class="table-cell table-full"><?php esc_html_e( 'Order reference', 'wpshop' ); ?></div>
22
-		<div class="table-cell table-200"><?php esc_html_e( 'Billing address', 'wpshop' ); ?></div>
23
-		<div class="table-cell table-150"><?php esc_html_e( 'Status', 'wpshop' ); ?></div>
24
-		<div class="table-cell table-100"><?php esc_html_e( 'Method of payment', 'wpshop' ); ?></div>
25
-		<div class="table-cell table-100"><?php esc_html_e( 'Price TTC(€)', 'wpshop' ); ?></div>
26
-		<?php do_action( 'wps_listing_table_header_end' ); ?>
21
+		<div class="table-cell table-full"><?php esc_html_e('Order reference', 'wpshop'); ?></div>
22
+		<div class="table-cell table-200"><?php esc_html_e('Billing address', 'wpshop'); ?></div>
23
+		<div class="table-cell table-150"><?php esc_html_e('Status', 'wpshop'); ?></div>
24
+		<div class="table-cell table-100"><?php esc_html_e('Method of payment', 'wpshop'); ?></div>
25
+		<div class="table-cell table-100"><?php esc_html_e('Price TTC(€)', 'wpshop'); ?></div>
26
+		<?php do_action('wps_listing_table_header_end'); ?>
27 27
 	</div>
28 28
 
29 29
 	<?php
30
-	if ( ! empty( $orders ) ) :
31
-		foreach ( $orders as $order ) :
32
-			\eoxia\View_Util::exec( 'wpshop', 'doli-order', 'item', array(
30
+	if (!empty($orders)) :
31
+		foreach ($orders as $order) :
32
+			\eoxia\View_Util::exec('wpshop', 'doli-order', 'item', array(
33 33
 				'order'    => $order,
34 34
 				'doli_url' => $doli_url,
35
-			) );
35
+			));
36 36
 		endforeach;
37 37
 	endif;
38 38
 	?>
Please login to merge, or discard this patch.
modules/contacts/view/item.view.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,25 +14,25 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19 19
 <div class="contact">
20 20
 	<div class="contact-title">
21
-		<?php if ( ! empty( $contact->data['displayname'] ) ) : ?>
22
-			<a href="<?php echo esc_attr( admin_url( 'user-edit.php?user_id=' . $contact->data['id'] . '&action=edit' ) ); ?>"><?php echo esc_html( $contact->data['displayname'] ); ?></a>
21
+		<?php if (!empty($contact->data['displayname'])) : ?>
22
+			<a href="<?php echo esc_attr(admin_url('user-edit.php?user_id=' . $contact->data['id'] . '&action=edit')); ?>"><?php echo esc_html($contact->data['displayname']); ?></a>
23 23
 		<?php endif; ?>
24
-		<?php if ( ! empty( $contact->data['email'] ) ) : ?>
25
-			<a href="mailto:<?php echo esc_html( $contact->data['email'] ); ?>" class="wpeo-tooltip-event" aria-label="<?php echo esc_html( $contact->data['email'] ); ?>"><i class="fas fa-envelope"></i></a>
24
+		<?php if (!empty($contact->data['email'])) : ?>
25
+			<a href="mailto:<?php echo esc_html($contact->data['email']); ?>" class="wpeo-tooltip-event" aria-label="<?php echo esc_html($contact->data['email']); ?>"><i class="fas fa-envelope"></i></a>
26 26
 		<?php endif; ?>
27 27
 
28
-		<?php do_action( 'wps_contact_item_contact_title_after', $contact ); ?>
28
+		<?php do_action('wps_contact_item_contact_title_after', $contact); ?>
29 29
 	</div>
30 30
 	<ul class="contact-list-data">
31
-		<?php if ( ! empty( $contact->data['phone'] ) ) : ?>
32
-			<li class="contact-data"><i class="fas fa-phone"></i> <?php echo esc_html( $contact->data['phone'] ); ?></li>
31
+		<?php if (!empty($contact->data['phone'])) : ?>
32
+			<li class="contact-data"><i class="fas fa-phone"></i> <?php echo esc_html($contact->data['phone']); ?></li>
33 33
 		<?php endif; ?>
34
-		<?php if ( ! empty( $contact->data['phone_mobile'] ) ) : ?>
35
-			<li class="contact-data"><i class="fas fa-mobile"></i> <?php echo esc_html( $contact->data['phone_mobile'] ); ?></li>
34
+		<?php if (!empty($contact->data['phone_mobile'])) : ?>
35
+			<li class="contact-data"><i class="fas fa-mobile"></i> <?php echo esc_html($contact->data['phone_mobile']); ?></li>
36 36
 		<?php endif; ?>
37 37
 	</ul>
38 38
 </div>
Please login to merge, or discard this patch.
modules/tools/view/main.view.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,19 +14,19 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19 19
 <div class="wrap wpeo-wrap">
20
-	<h2><?php esc_html_e( 'Tools', 'wpshop' ); ?></h2>
20
+	<h2><?php esc_html_e('Tools', 'wpshop'); ?></h2>
21 21
 
22 22
 	<div class="wpeo-tab">
23 23
 		<ul class="tab-list">
24
-			<a href="<?php echo esc_url( admin_url( 'admin-post.php?action=wps_load_tools_tab&_wpnonce=' . wp_create_nonce( 'callback_load_tab' ) . '&tab=general' ) ); ?>" class="tab-element <?php echo ( 'general' === $tab ) ? 'tab-active' : ''; ?>"><?php esc_html_e( 'General', 'wpshop' ); ?></a>
24
+			<a href="<?php echo esc_url(admin_url('admin-post.php?action=wps_load_tools_tab&_wpnonce=' . wp_create_nonce('callback_load_tab') . '&tab=general')); ?>" class="tab-element <?php echo ('general' === $tab) ? 'tab-active' : ''; ?>"><?php esc_html_e('General', 'wpshop'); ?></a>
25 25
 		</ul>
26 26
 
27 27
 		<div class="tab-container">
28 28
 			<div class="tab-content tab-active">
29
-				<?php call_user_func( array( Tools::g(), 'display_' . $tab ), $section ); ?>
29
+				<?php call_user_func(array(Tools::g(), 'display_' . $tab), $section); ?>
30 30
 			</div>
31 31
 		</div>
32 32
 	</div>
Please login to merge, or discard this patch.
modules/tools/class/class-tools.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
18 18
 
19 19
 /**
20 20
  * Tools Class.
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 	 *
35 35
 	 * @param  string $section La section actuelle.
36 36
 	 */
37
-	public function display_general( $section ) {
38
-		\eoxia\View_Util::exec( 'wpshop', 'tools', 'general' );
37
+	public function display_general($section) {
38
+		\eoxia\View_Util::exec('wpshop', 'tools', 'general');
39 39
 	}
40 40
 }
41 41
 
Please login to merge, or discard this patch.
modules/products/shortcode/class-products-shortcode.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
18 18
 
19 19
 /**
20 20
  * Product Shortcode Class.
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 	 * @since 2.0.0
28 28
 	 */
29 29
 	public function __construct() {
30
-		add_shortcode( 'wps_product', array( $this, 'do_shortcode_product' ) );
31
-		add_shortcode( 'wps_categories', array( $this, 'do_shortcode_categories' ) );
30
+		add_shortcode('wps_product', array($this, 'do_shortcode_product'));
31
+		add_shortcode('wps_categories', array($this, 'do_shortcode_categories'));
32 32
 	}
33 33
 
34 34
 	/**
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
 	 * @param  array $atts Les paramètres du shortcode. (Voir shorcode_atts
40 40
 	 * ci dessous pour les paramètres disponibles).
41 41
 	 */
42
-	public function do_shortcode_product( $atts ) {
43
-		if ( ! is_admin() ) {
44
-			$a = shortcode_atts( array(
42
+	public function do_shortcode_product($atts) {
43
+		if (!is_admin()) {
44
+			$a = shortcode_atts(array(
45 45
 				'id'         => 0,
46 46
 				'ids'        => array(),
47 47
 				'categories' => array(),
48 48
 				's'          => '',
49
-			), $atts );
49
+			), $atts);
50 50
 
51 51
 			global $post;
52 52
 			global $wp_query;
@@ -56,18 +56,18 @@  discard block
 block discarded – undo
56 56
 				'tax_query' => array(),
57 57
 			);
58 58
 
59
-			if ( ! empty( $a['id'] ) ) {
59
+			if (!empty($a['id'])) {
60 60
 				$args['id'] = $a['id'];
61 61
 			}
62 62
 
63
-			if ( ! empty( $a['ids'] ) ) {
64
-				$a['ids']         = explode( ',', $a['ids'] );
63
+			if (!empty($a['ids'])) {
64
+				$a['ids']         = explode(',', $a['ids']);
65 65
 				$args['post__in'] = $a['ids'];
66 66
 			}
67 67
 
68
-			if ( ! empty( $a['categories'] ) ) {
69
-				$a['categories'] = explode( ',', $a['categories'] );
70
-				foreach ( $a['categories'] as $category_slug ) {
68
+			if (!empty($a['categories'])) {
69
+				$a['categories'] = explode(',', $a['categories']);
70
+				foreach ($a['categories'] as $category_slug) {
71 71
 					$args['tax_query'][] = array(
72 72
 						'taxonomy' => 'wps-product-cat',
73 73
 						'field'    => 'slug',
@@ -76,24 +76,24 @@  discard block
 block discarded – undo
76 76
 				}
77 77
 			}
78 78
 
79
-			if ( ! empty( $a['s'] ) ) {
79
+			if (!empty($a['s'])) {
80 80
 				$args['s'] = $a['s'];
81 81
 			}
82 82
 
83 83
 			$args['post_type'] = 'wps-product';
84 84
 
85
-			$wps_query = new \WP_Query( $args );
85
+			$wps_query = new \WP_Query($args);
86 86
 
87
-			foreach ( $wps_query->posts as $key => &$product ) {
88
-				$product->price_ttc    = get_post_meta( $product->ID, '_price_ttc', true );
89
-				$product->manage_stock = get_post_meta( $product->ID, '_manage_stock', true );
90
-				$product->stock        = get_post_meta( $product->ID, '_stock', true );
87
+			foreach ($wps_query->posts as $key => &$product) {
88
+				$product->price_ttc    = get_post_meta($product->ID, '_price_ttc', true);
89
+				$product->manage_stock = get_post_meta($product->ID, '_manage_stock', true);
90
+				$product->stock        = get_post_meta($product->ID, '_stock', true);
91 91
 			}
92 92
 
93
-			unset( $product );
94
-			setup_postdata( $post );
93
+			unset($product);
94
+			setup_postdata($post);
95 95
 
96
-			include( Template_Util::get_template_part( 'products', 'wps-product-grid-container' ) );
96
+			include(Template_Util::get_template_part('products', 'wps-product-grid-container'));
97 97
 		}
98 98
 	}
99 99
 
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
 	 * @param  array $atts Les paramètres du shortcode. (Voir shorcode_atts
106 106
 	 * ci dessous pour les paramètres disponibles).
107 107
 	 */
108
-	public function do_shortcode_categories( $atts ) {
109
-		if ( ! is_admin() ) {
110
-			$default_atts = shortcode_atts( array(
108
+	public function do_shortcode_categories($atts) {
109
+		if (!is_admin()) {
110
+			$default_atts = shortcode_atts(array(
111 111
 				'slug'    => '',
112 112
 				'id'      => '',
113 113
 				'orderby' => 'include',
114 114
 				'order'   => 'ASC',
115
-			), $atts );
115
+			), $atts);
116 116
 
117 117
 			$args = array(
118 118
 				'taxonomy'   => 'wps-product-cat',
@@ -121,20 +121,20 @@  discard block
 block discarded – undo
121 121
 				'order'      => $default_atts['order'],
122 122
 			);
123 123
 
124
-			if ( ! empty( $default_atts['slug'] ) ) {
125
-				$default_atts['slug'] = explode( ',', $default_atts['slug'] );
124
+			if (!empty($default_atts['slug'])) {
125
+				$default_atts['slug'] = explode(',', $default_atts['slug']);
126 126
 				$args['slug']         = $default_atts['slug'];
127 127
 			}
128 128
 
129
-			if ( ! empty( $default_atts['id'] ) ) {
130
-				$default_atts['id'] = explode( ',', $default_atts['id'] );
129
+			if (!empty($default_atts['id'])) {
130
+				$default_atts['id'] = explode(',', $default_atts['id']);
131 131
 				$args['include']    = $default_atts['id'];
132 132
 			}
133 133
 
134
-			$product_taxonomies = get_terms( $args );
134
+			$product_taxonomies = get_terms($args);
135 135
 
136 136
 			ob_start();
137
-			include( Template_Util::get_template_part( 'products', 'wps-product-taxonomy-container' ) );
137
+			include(Template_Util::get_template_part('products', 'wps-product-taxonomy-container'));
138 138
 			return ob_get_clean();
139 139
 		}
140 140
 	}
Please login to merge, or discard this patch.
modules/products/view/frontend/wps-product-list.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,33 +11,33 @@
 block discarded – undo
11 11
 
12 12
 namespace wpshop;
13 13
 
14
-defined( 'ABSPATH' ) || exit;
14
+defined('ABSPATH') || exit;
15 15
 
16 16
 ?>
17 17
 <div itemscope itemtype="https://schema.org/Product" class="wps-product">
18 18
 	<figure class="wps-product-thumbnail">
19 19
 		<?php
20
-		if ( ! empty( $product['thumbnail_id'] ) ) :
21
-			echo wp_get_attachment_image( $product['thumbnail_id'], 'thumbnail', '', array(
20
+		if (!empty($product['thumbnail_id'])) :
21
+			echo wp_get_attachment_image($product['thumbnail_id'], 'thumbnail', '', array(
22 22
 				'class'    => 'attachment-wps-product-thumbnail',
23 23
 				'itemprop' => 'image',
24
-			) );
24
+			));
25 25
 		else :
26 26
 			echo '<img src="' . PLUGIN_WPSHOP_URL . '/core/asset/image/default-product-thumbnail-min.jpg" class="attachment-wps-product-thumbnail" itemprop="image" /> ';
27 27
 		endif;
28 28
 		?>
29 29
 	</figure>
30 30
 	<div class="wps-product-content">
31
-		<div itemprop="name" class="wps-product-title"><?php echo esc_html( $product['title'] ); ?></div>
31
+		<div itemprop="name" class="wps-product-title"><?php echo esc_html($product['title']); ?></div>
32 32
 		<ul class="wps-product-attributes">
33
-			<li class="wps-product-attributes-item"><?php echo esc_html_e( 'Unit price:', 'wpshop' ) . ' ' . esc_html( number_format( $product['price_ttc'], 2, '.', '' ) ); ?>€</li>
33
+			<li class="wps-product-attributes-item"><?php echo esc_html_e('Unit price:', 'wpshop') . ' ' . esc_html(number_format($product['price_ttc'], 2, '.', '')); ?>€</li>
34 34
 		</ul>
35 35
 		<div class="wps-product-footer">
36
-			<div class="wps-product-quantity"><?php echo esc_html( $product['qty'] ); ?></div>
37
-			<?php if ( ! empty( $product['price_ttc'] ) ) : ?>
36
+			<div class="wps-product-quantity"><?php echo esc_html($product['qty']); ?></div>
37
+			<?php if (!empty($product['price_ttc'])) : ?>
38 38
 				<div itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="wps-product-price">
39
-					<span itemprop="price" content="<?php echo esc_html( number_format( $product['price_ttc'] * $product['qty'], 2, '.', '' ) ); ?>"><?php echo esc_html( number_format( $product['price_ttc'] * $product['qty'], 2, '.', '' ) ); ?></span>
40
-					<span itemprop="priceCurrency" content="EUR"><?php echo esc_html( '€', 'wpshop' ); ?></span>
39
+					<span itemprop="price" content="<?php echo esc_html(number_format($product['price_ttc'] * $product['qty'], 2, '.', '')); ?>"><?php echo esc_html(number_format($product['price_ttc'] * $product['qty'], 2, '.', '')); ?></span>
40
+					<span itemprop="priceCurrency" content="EUR"><?php echo esc_html('€', 'wpshop'); ?></span>
41 41
 				</div>
42 42
 			<?php endif; ?>
43 43
 		</div>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,8 +22,10 @@
 block discarded – undo
22 22
 				'class'    => 'attachment-wps-product-thumbnail',
23 23
 				'itemprop' => 'image',
24 24
 			) );
25
-		else :
25
+		else {
26
+			:
26 27
 			echo '<img src="' . PLUGIN_WPSHOP_URL . '/core/asset/image/default-product-thumbnail-min.jpg" class="attachment-wps-product-thumbnail" itemprop="image" /> ';
28
+		}
27 29
 		endif;
28 30
 		?>
29 31
 	</figure>
Please login to merge, or discard this patch.
modules/products/view/frontend/wps-product-grid-container.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,16 +11,16 @@  discard block
 block discarded – undo
11 11
 
12 12
 namespace wpshop;
13 13
 
14
-defined( 'ABSPATH' ) || exit;
14
+defined('ABSPATH') || exit;
15 15
 
16
-if ( $wps_query->have_posts() ) :
16
+if ($wps_query->have_posts()) :
17 17
 	?>
18 18
 	<div class="wps-product-grid wpeo-gridlayout grid-4">
19 19
 
20 20
 		<?php
21
-		while ( $wps_query->have_posts() ) :
21
+		while ($wps_query->have_posts()) :
22 22
 			$wps_query->the_post();
23
-			include( Template_Util::get_template_part( 'products', 'wps-product-grid' ) );
23
+			include(Template_Util::get_template_part('products', 'wps-product-grid'));
24 24
 		endwhile;
25 25
 		wp_reset_postdata();
26 26
 		?>
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 	</div>
29 29
 	<?php
30 30
 	$big = 999999999;
31
-	echo paginate_links( array(
32
-		'base'      => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
31
+	echo paginate_links(array(
32
+		'base'      => str_replace($big, '%#%', get_pagenum_link($big)),
33 33
 		'format'    => '?paged=%#%',
34
-		'current'   => max( 1, get_query_var('paged') ),
34
+		'current'   => max(1, get_query_var('paged')),
35 35
 		'total'     => $wps_query->max_num_pages,
36 36
 		'next_text' => '<i class="dashicons dashicons-arrow-right"></i>',
37 37
 		'prev_text' => '<i class="dashicons dashicons-arrow-left"></i>',
38
-	) );
38
+	));
39 39
 endif;
Please login to merge, or discard this patch.