Completed
Branch 2.0.0 (fb6d70)
by Jimmy
02:28
created
modules/products/view/frontend/wps-product-grid.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,18 +11,18 @@  discard block
 block discarded – undo
11 11
 
12 12
 namespace wpshop;
13 13
 
14
-defined( 'ABSPATH' ) || exit;
14
+defined('ABSPATH') || exit;
15 15
 ?>
16 16
 <div itemscope itemtype="https://schema.org/Product" class="wps-product">
17 17
 	<figure class="wps-product-thumbnail">
18 18
 
19 19
 		<?php
20
-		$post->data = (array) $post;
21
-		if ( has_post_thumbnail() ) :
22
-			the_post_thumbnail( 'wps-product-thumbnail', array(
20
+		$post->data = (array)$post;
21
+		if (has_post_thumbnail()) :
22
+			the_post_thumbnail('wps-product-thumbnail', array(
23 23
 				'class'    => 'attachment-wps-product-thumbnail',
24 24
 				'itemprop' => 'image',
25
-			) );
25
+			));
26 26
 		else :
27 27
 			echo '<img src="' . PLUGIN_WPSHOP_URL . '/core/asset/image/default-product-thumbnail.jpg" class="attachment-wps-product-thumbnail" itemprop="image" /> ';
28 28
 		endif;
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
 			<a itemprop="url" href="<?php the_permalink(); ?>" class="wpeo-button button-square-40 button-rounded button-light">
33 33
 				<i class="button-icon fas fa-eye"></i>
34 34
 			</a>
35
-			<div class="wps-product-buy wpeo-button button-square-40 button-rounded button-light action-attribute <?php echo apply_filters( 'wps_product_add_to_cart_class', '', $post ); ?>"
36
-				<?php echo apply_filters( 'wps_product_add_to_cart_attr', '', $post ); ?>
35
+			<div class="wps-product-buy wpeo-button button-square-40 button-rounded button-light action-attribute <?php echo apply_filters('wps_product_add_to_cart_class', '', $post); ?>"
36
+				<?php echo apply_filters('wps_product_add_to_cart_attr', '', $post); ?>
37 37
 				data-action="add_to_cart"
38
-				data-nonce="<?php echo wp_create_nonce( 'add_to_cart' ); ?>"
39
-				data-id="<?php echo esc_attr( the_ID() ); ?>"><i class="button-icon fas fa-cart-arrow-down"></i></div>
38
+				data-nonce="<?php echo wp_create_nonce('add_to_cart'); ?>"
39
+				data-id="<?php echo esc_attr(the_ID()); ?>"><i class="button-icon fas fa-cart-arrow-down"></i></div>
40 40
 		</div>
41 41
 		<a itemprop="url" href="<?php the_permalink(); ?>" class="wps-product-link"></a>
42 42
 	</figure>
43 43
 	<div class="wps-product-content">
44 44
 		<div itemprop="name" class="wps-product-title"><?php the_title(); ?></div>
45
-		<?php if ( ! empty( $post->price_ttc ) ) : ?>
45
+		<?php if (!empty($post->price_ttc)) : ?>
46 46
 			<div itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="wps-product-price">
47
-				<span itemprop="price" content="<?php echo esc_html( number_format( $post->price_ttc, 2, '.', '' ) ); ?>"><?php echo esc_html( number_format( $post->price_ttc, 2, ',', '' ) ); ?></span>
48
-				<span itemprop="priceCurrency" content="EUR"><?php echo esc_html( '€', 'wpshop' ); ?></span>
47
+				<span itemprop="price" content="<?php echo esc_html(number_format($post->price_ttc, 2, '.', '')); ?>"><?php echo esc_html(number_format($post->price_ttc, 2, ',', '')); ?></span>
48
+				<span itemprop="priceCurrency" content="EUR"><?php echo esc_html('€', 'wpshop'); ?></span>
49 49
 			</div>
50 50
 		<?php endif; ?>
51 51
 	</div>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,8 +23,10 @@
 block discarded – undo
23 23
 				'class'    => 'attachment-wps-product-thumbnail',
24 24
 				'itemprop' => 'image',
25 25
 			) );
26
-		else :
26
+		else {
27
+			:
27 28
 			echo '<img src="' . PLUGIN_WPSHOP_URL . '/core/asset/image/default-product-thumbnail.jpg" class="attachment-wps-product-thumbnail" itemprop="image" /> ';
29
+		}
28 30
 		endif;
29 31
 		?>
30 32
 
Please login to merge, or discard this patch.
modules/products/view/frontend/wps-product-taxonomy-container.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@
 block discarded – undo
11 11
 
12 12
 namespace wpshop;
13 13
 
14
-defined( 'ABSPATH' ) || exit;
14
+defined('ABSPATH') || exit;
15 15
 
16
-if ( ! empty( $product_taxonomies ) ) :
16
+if (!empty($product_taxonomies)) :
17 17
 	?>
18 18
 	<div class="wps-list-taxonomy wpeo-gridlayout grid-3 grid-margin-2">
19 19
 		<?php
20
-		foreach ( $product_taxonomies as $product_taxonomy ) :
21
-			include( Template_Util::get_template_part( 'products', 'wps-product-taxonomy' ) );
20
+		foreach ($product_taxonomies as $product_taxonomy) :
21
+			include(Template_Util::get_template_part('products', 'wps-product-taxonomy'));
22 22
 		endforeach;
23 23
 		?>
24 24
 	</div>
Please login to merge, or discard this patch.
modules/checkout/view/frontend/valid-checkout.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  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
 <?php
20 20
 // translators: Thanks, your order has been received.
21
-printf( __( 'Thanks, your %s has been received', 'wpshop' ), $title );
21
+printf(__('Thanks, your %s has been received', 'wpshop'), $title);
22 22
 ?>
23 23
 
24 24
 <div class="wpeo-gridlayout grid-2">
@@ -26,19 +26,19 @@  discard block
 block discarded – undo
26 26
 		<li>
27 27
 			<?php
28 28
 			// translators: order number: 011111.
29
-			printf( __( '%s :', 'wpshop' ), ucfirst( $title ) );
29
+			printf(__('%s :', 'wpshop'), ucfirst($title));
30 30
 			?>
31
-			<strong><?php echo esc_html( $object->data['title'] ); ?></strong>
31
+			<strong><?php echo esc_html($object->data['title']); ?></strong>
32 32
 		</li>
33
-		<li><?php esc_html_e( 'Date', 'wpshop' ); ?> : <strong><?php echo esc_html( $object->data['date']['rendered']['date'] ); ?></strong></li>
34
-		<li><?php esc_html_e( 'Total', 'wpshop' ); ?> : <strong><?php echo esc_html( number_format( $object->data['total_ttc'], 2 ) ); ?>€</strong></li>
35
-		<li><?php esc_html_e( 'Method of payment', 'wpshop' ); ?> :
36
-			<strong><?php echo esc_html( Payment::g()->get_payment_title( $object->data['payment_method'] ) ); ?></strong>
33
+		<li><?php esc_html_e('Date', 'wpshop'); ?> : <strong><?php echo esc_html($object->data['date']['rendered']['date']); ?></strong></li>
34
+		<li><?php esc_html_e('Total', 'wpshop'); ?> : <strong><?php echo esc_html(number_format($object->data['total_ttc'], 2)); ?>€</strong></li>
35
+		<li><?php esc_html_e('Method of payment', 'wpshop'); ?> :
36
+			<strong><?php echo esc_html(Payment::g()->get_payment_title($object->data['payment_method'])); ?></strong>
37 37
 		</li>
38 38
 	</ul>
39 39
 
40 40
 	<div id="order_review" class="wps-checkout-review-order">
41
-		<?php do_action( 'wps_checkout_order_review', $total_price_no_shipping, $tva_amount, $total_price_ttc, $shipping_cost ); ?>
41
+		<?php do_action('wps_checkout_order_review', $total_price_no_shipping, $tva_amount, $total_price_ttc, $shipping_cost); ?>
42 42
 	</div>
43 43
 </div>
44 44
 
Please login to merge, or discard this patch.
modules/checkout/view/frontend/payment.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -14,33 +14,33 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19 19
 <div id="payment" class="wps-checkout-payment">
20 20
 
21
-	<div class="wps-checkout-subtitle"><?php esc_html_e( 'Payment method', 'wpshop' ); ?></div>
21
+	<div class="wps-checkout-subtitle"><?php esc_html_e('Payment method', 'wpshop'); ?></div>
22 22
 
23 23
 	<ul class="wps-payment-list wpeo-gridlayout grid-2 grid-gap-0">
24 24
 		<?php
25
-		if ( ! empty( $payment_methods ) ) :
26
-			foreach ( $payment_methods as $key => $payment_method ) :
27
-				if ( $payment_method['active'] ) :
25
+		if (!empty($payment_methods)) :
26
+			foreach ($payment_methods as $key => $payment_method) :
27
+				if ($payment_method['active']) :
28 28
 					$checked = '';
29
-					if ( 'cheque' === $key ) :
29
+					if ('cheque' === $key) :
30 30
 						$checked = 'checked';
31 31
 					endif;
32 32
 					?>
33
-					<li class="wps-payment <?php echo esc_attr( $checked ); ?>">
34
-						<label for="radio-<?php echo esc_attr( $key ); ?>" class="wps-payment-container">
33
+					<li class="wps-payment <?php echo esc_attr($checked); ?>">
34
+						<label for="radio-<?php echo esc_attr($key); ?>" class="wps-payment-container">
35 35
 							<div class="wps-payment-title">
36
-								<input type="radio" id="radio-<?php echo esc_attr( $key ); ?>" class="form-field" name="type_payment" <?php echo esc_attr( $checked ); ?> value="<?php echo $key; ?>">
36
+								<input type="radio" id="radio-<?php echo esc_attr($key); ?>" class="form-field" name="type_payment" <?php echo esc_attr($checked); ?> value="<?php echo $key; ?>">
37 37
 								<span class="wps-payement-icon"><?php echo $payment_method['logo']; ?></span>
38
-								<span class="wps-payement-label"><?php echo esc_html( $payment_method['title'] ); ?></span>
38
+								<span class="wps-payement-label"><?php echo esc_html($payment_method['title']); ?></span>
39 39
 							</div>
40 40
 							<?php
41
-							if ( ! empty( $payment_method['description'] ) ) :
41
+							if (!empty($payment_method['description'])) :
42 42
 								?>
43
-								<div class="wps-payment-description"><?php echo apply_filters( 'wps_payment_method_' . $key . '_description', nl2br( $payment_method['description'] ) ); ?></div>
43
+								<div class="wps-payment-description"><?php echo apply_filters('wps_payment_method_' . $key . '_description', nl2br($payment_method['description'])); ?></div>
44 44
 								<?php
45 45
 							endif;
46 46
 							?>
Please login to merge, or discard this patch.
modules/checkout/view/frontend/resume-list-product.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
18 18
 
19
-if ( ! empty( Cart_Session::g()->cart_contents ) ) :
19
+if (!empty(Cart_Session::g()->cart_contents)) :
20 20
 	?>
21 21
 	<div class="wps-list-product">
22 22
 		<?php
23
-		foreach ( Cart_Session::g()->cart_contents as $key => $product ) :
24
-			if ( $shipping_cost_option['shipping_product_id'] !== $product['id'] ) :
25
-				include( Template_Util::get_template_part( 'products', 'wps-product-list' ) );
23
+		foreach (Cart_Session::g()->cart_contents as $key => $product) :
24
+			if ($shipping_cost_option['shipping_product_id'] !== $product['id']) :
25
+				include(Template_Util::get_template_part('products', 'wps-product-list'));
26 26
 			endif;
27 27
 		endforeach;
28 28
 		?>
Please login to merge, or discard this patch.
modules/checkout/view/frontend/form-checkout.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,23 +14,23 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit;
17
+defined('ABSPATH') || exit;
18 18
 
19
-do_action( 'wps_before_checkout_form' ); ?>
19
+do_action('wps_before_checkout_form'); ?>
20 20
 
21 21
 <div class="wps-checkout wpeo-gridlayout grid-5">
22 22
 	<div class="gridw-3">
23
-		<?php include( Template_Util::get_template_part( 'checkout', 'form-checkout-step-1' ) ); ?>
24
-		<?php include( Template_Util::get_template_part( 'checkout', 'form-checkout-step-2' ) ); ?>
23
+		<?php include(Template_Util::get_template_part('checkout', 'form-checkout-step-1')); ?>
24
+		<?php include(Template_Util::get_template_part('checkout', 'form-checkout-step-2')); ?>
25 25
 	</div>
26 26
 	<div class="gridw-2 wpeo-form">
27
-		<?php include( Template_Util::get_template_part( 'checkout', 'form-checkout-step-3' ) ); ?>
27
+		<?php include(Template_Util::get_template_part('checkout', 'form-checkout-step-3')); ?>
28 28
 
29
-		<?php do_action( 'wps_review_order_before_submit' ); ?>
29
+		<?php do_action('wps_review_order_before_submit'); ?>
30 30
 
31
-		<?php wp_nonce_field( 'callback_place_order' ); ?>
31
+		<?php wp_nonce_field('callback_place_order'); ?>
32 32
 		<input type="hidden" name="action" value="wps_place_order" />
33 33
 
34
-		<?php do_action( 'wps_review_order_after_submit' ); ?>
34
+		<?php do_action('wps_review_order_after_submit'); ?>
35 35
 	</div>
36 36
 </div>
Please login to merge, or discard this patch.
modules/checkout/view/frontend/proceed-to-checkout-button.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19
-<a href="<?php echo esc_url( $link_checkout ); ?>" class="wpeo-button alignright wps-process-checkout-button">
20
-	<?php esc_html_e( 'Proceed to checkout', 'wpshop' ); ?>
19
+<a href="<?php echo esc_url($link_checkout); ?>" class="wpeo-button alignright wps-process-checkout-button">
20
+	<?php esc_html_e('Proceed to checkout', 'wpshop'); ?>
21 21
 </a>
Please login to merge, or discard this patch.
modules/checkout/view/frontend/terms.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 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="form-element terms">
20 20
 	<label class="form-field-container">
21 21
 		<div class="form-field-inline">
22 22
 			<input type="checkbox" id="terms" class="form-field" name="terms">
23
-			<label for="terms"><?php echo apply_filters( 'wps_checkout_terms', $terms_message ); ?></label>
23
+			<label for="terms"><?php echo apply_filters('wps_checkout_terms', $terms_message); ?></label>
24 24
 		</div>
25 25
 	</label>
26 26
 </div>
Please login to merge, or discard this patch.
modules/checkout/view/frontend/place-order-button.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 
15 15
 namespace wpshop;
16 16
 
17
-defined( 'ABSPATH' ) || exit; ?>
17
+defined('ABSPATH') || exit; ?>
18 18
 
19 19
 <a class="wps-process-checkout-button action-input wpeo-button" data-type="order" data-parent="wps-checkout">
20
-	<?php esc_html_e( 'Place order', 'wpshop' ); ?>
20
+	<?php esc_html_e('Place order', 'wpshop'); ?>
21 21
 </a>
Please login to merge, or discard this patch.