Completed
Pull Request — master (#2)
by Jimmy
1216:52 queued 1185:43
created
modules/wps_customer/templates/frontend/signup/signup-newsletter.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?> 
3 3
 	if( !empty( $wpshop_cart_option['display_newsletter']['site_subscription'][0] ) && $wpshop_cart_option['display_newsletter']['site_subscription'][0] == 'yes' ) {
4 4
 ?>
5 5
 	<div class="wps-form-group">
6
-		<input id="newsletters_site" type="checkbox" name="newsletters_site" <?php echo ( (!empty($user_preferences['newsletters_site']) && $user_preferences['newsletters_site']== 1 ) ? ' checked="checked"' : null); ?>>
7
-		<label for="newsletters_site"><?php _e('I want to receive promotional information from the site','wpshop'); ?></label>
6
+		<input id="newsletters_site" type="checkbox" name="newsletters_site" <?php echo ((!empty($user_preferences['newsletters_site']) && $user_preferences['newsletters_site'] == 1) ? ' checked="checked"' : null); ?>>
7
+		<label for="newsletters_site"><?php _e('I want to receive promotional information from the site', 'wpshop'); ?></label>
8 8
 	</div>
9 9
 <?php 
10 10
 	}
11
-	if( !empty( $wpshop_cart_option['display_newsletter']['partner_subscription'][0]) && $wpshop_cart_option['display_newsletter']['partner_subscription'][0] == 'yes' ) {
11
+	if (!empty($wpshop_cart_option['display_newsletter']['partner_subscription'][0]) && $wpshop_cart_option['display_newsletter']['partner_subscription'][0] == 'yes') {
12 12
 ?>
13 13
 	<div class="wps-form-group">
14
-		<input id="newsletters_site_partners" type="checkbox" name="newsletters_site_partners" <?php echo ((!empty($user_preferences['newsletters_site_partners']) && $user_preferences['newsletters_site_partners']==1 ) ? ' checked="checked"' : null); ?>/>
15
-		<label for="newsletters_site_partners"><?php _e('I want to receive promotional information from partner companies','wpshop'); ?></label>
14
+		<input id="newsletters_site_partners" type="checkbox" name="newsletters_site_partners" <?php echo ((!empty($user_preferences['newsletters_site_partners']) && $user_preferences['newsletters_site_partners'] == 1) ? ' checked="checked"' : null); ?>/>
15
+		<label for="newsletters_site_partners"><?php _e('I want to receive promotional information from partner companies', 'wpshop'); ?></label>
16 16
 	</div>
17 17
 <?php 
18 18
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
templates/frontend/account/account_informations_group_element.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3
-<span class="wps-h4"><?php _e( $attributes_section->name, 'wpshop' ); ?></span>
3
+<span class="wps-h4"><?php _e($attributes_section->name, 'wpshop'); ?></span>
4 4
 <div><?php echo $attribute_details; ?></div>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
wps_customer/templates/frontend/account/account_informations_element.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 
3
-if( isset( $attribute_def->code ) && $attribute_def->code != 'is_provider' ) { ?>
3
+if (isset($attribute_def->code) && $attribute_def->code != 'is_provider') { ?>
4 4
 <div class="wps-form-group">
5
-	<?php echo stripslashes( $attribute_def->frontend_label ); ?> : <?php echo ( !empty($attribute_value) ) ? $attribute_value : ''; ?>
5
+	<?php echo stripslashes($attribute_def->frontend_label); ?> : <?php echo (!empty($attribute_value)) ? $attribute_value : ''; ?>
6 6
 </div>
7 7
 <?php } ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
templates/backend/customer-informations/wps_order_customer_informations.php 2 patches
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 ?>
3 5
 <div class="wps-gridwrapper2-padded">
4 6
 
@@ -28,8 +30,11 @@  discard block
 block discarded – undo
28 30
 		<div>
29 31
 			<?php echo $customer_datas; ?>
30 32
 		</div>
31
-		<?php else : ?>
32
-			<div class="wps-alert-info"><span class="dashicons dashicons-info"></span> <?php _e( 'Please choose a customer or create one', 'wpshop'); ?></div>
33
+		<?php else {
34
+	: ?>
35
+			<div class="wps-alert-info"><span class="dashicons dashicons-info"></span> <?php _e( 'Please choose a customer or create one', 'wpshop');
36
+}
37
+?></div>
33 38
 		<?php endif; ?>
34 39
 	</div>
35 40
 	
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div class="wps-gridwrapper2-padded">
4 4
 
5 5
 	<div>
6
-		<?php if( empty($order_metadata) || ( !empty($order_metadata) && !empty($order_metadata['order_status']) && $order_metadata['order_status'] == 'awaiting_payment')  ) : ?>
6
+		<?php if (empty($order_metadata) || (!empty($order_metadata) && !empty($order_metadata['order_status']) && $order_metadata['order_status'] == 'awaiting_payment')) : ?>
7 7
 		<div class="wps-boxed">
8
-			<div class="wps-h5"><?php _e( 'Customer Managment', 'wpshop'); ?><a href="<?php print wp_nonce_url( admin_url( 'admin-ajax.php?action=wps_load_customer_creation_form_in_admin&width=730&height=690' ), 'wps_load_customer_creation_form_in_admin', '_wpnonce' ); ?>" title="<?php _e( 'Create a customer', 'wpshop'); ?>" class="add-new-h2 alignright thickbox"><i class="wps-icon-plus"></i> <?php _e( 'Create a customer', 'wpshop'); ?></a></div>
8
+			<div class="wps-h5"><?php _e('Customer Managment', 'wpshop'); ?><a href="<?php print wp_nonce_url(admin_url('admin-ajax.php?action=wps_load_customer_creation_form_in_admin&width=730&height=690'), 'wps_load_customer_creation_form_in_admin', '_wpnonce'); ?>" title="<?php _e('Create a customer', 'wpshop'); ?>" class="add-new-h2 alignright thickbox"><i class="wps-icon-plus"></i> <?php _e('Create a customer', 'wpshop'); ?></a></div>
9 9
 
10 10
 			<div class="wps-gridwrapper2-padded" style="clear : both; ">
11 11
 				<div>
12 12
 					<div class="wps-form-group">
13
-						<label><?php _e( 'Search and choose a customer', 'wpshop'); ?> :</label>
14
-						<div class="wps-form" id="wps_customer_list_container" data-nonce="<?php wp_create_nonce( 'wps_order_refresh_customer_list' ); ?>">
13
+						<label><?php _e('Search and choose a customer', 'wpshop'); ?> :</label>
14
+						<div class="wps-form" id="wps_customer_list_container" data-nonce="<?php wp_create_nonce('wps_order_refresh_customer_list'); ?>">
15 15
 							<?php echo $customer_lists; ?>
16 16
 						</div>
17 17
 					</div>
@@ -23,24 +23,24 @@  discard block
 block discarded – undo
23 23
 		<?php endif; ?>
24 24
 	</div>
25 25
 
26
-	<div id="wps_customer_account_informations" data-nonce="<?php echo wp_create_nonce( 'wps_order_refresh_customer_informations' ); ?>">
27
-		<?php if( !empty($order_metadata) ) : ?>
26
+	<div id="wps_customer_account_informations" data-nonce="<?php echo wp_create_nonce('wps_order_refresh_customer_informations'); ?>">
27
+		<?php if (!empty($order_metadata)) : ?>
28 28
 		<div>
29 29
 			<?php echo $customer_datas; ?>
30 30
 		</div>
31 31
 		<?php else : ?>
32
-			<div class="wps-alert-info"><span class="dashicons dashicons-info"></span> <?php _e( 'Please choose a customer or create one', 'wpshop'); ?></div>
32
+			<div class="wps-alert-info"><span class="dashicons dashicons-info"></span> <?php _e('Please choose a customer or create one', 'wpshop'); ?></div>
33 33
 		<?php endif; ?>
34 34
 	</div>
35 35
 
36 36
 </div>
37 37
 <!-- Hidden field referrer the selected customer -->
38
-<input type="hidden" name="wps_customer_id" id="wps_orders_selected_customer" value="<?php echo ( !empty($order_metadata) && !empty($order_metadata['customer_id']) ) ? $order_metadata['customer_id'] : ''; ?>" />
38
+<input type="hidden" name="wps_customer_id" id="wps_orders_selected_customer" value="<?php echo (!empty($order_metadata) && !empty($order_metadata['customer_id'])) ? $order_metadata['customer_id'] : ''; ?>" />
39 39
 
40 40
 <div id="wps_customer_addresses" class="wps-gridwrapper2-padded">
41
-	<?php echo ( !empty($addresses) ) ? $addresses : ''; ?>
41
+	<?php echo (!empty($addresses)) ? $addresses : ''; ?>
42 42
 </div>
43
-<input type="hidden" name="wps_order_selected_address[billing]" id="wps_order_selected_address_billing" value="<?php echo ( !empty($order_infos) && !empty($order_infos['billing']) && !empty($order_infos['billing']['address_id']) ) ? $order_infos['billing']['address_id'] : '' ; ?>" />
44
-<?php if( !empty( $shipping_address_option ) && !empty($shipping_address_option['activate']) ) : ?>
45
-	<input type="hidden" name="wps_order_selected_address[shipping]" id="wps_order_selected_address_shipping" value="<?php echo ( !empty($order_infos) && !empty($order_infos['shipping']) && !empty($order_infos['shipping']['address_id']) ) ? $order_infos['shipping']['address_id'] : '' ; ?>" />
43
+<input type="hidden" name="wps_order_selected_address[billing]" id="wps_order_selected_address_billing" value="<?php echo (!empty($order_infos) && !empty($order_infos['billing']) && !empty($order_infos['billing']['address_id'])) ? $order_infos['billing']['address_id'] : ''; ?>" />
44
+<?php if (!empty($shipping_address_option) && !empty($shipping_address_option['activate'])) : ?>
45
+	<input type="hidden" name="wps_order_selected_address[shipping]" id="wps_order_selected_address_shipping" value="<?php echo (!empty($order_infos) && !empty($order_infos['shipping']) && !empty($order_infos['shipping']['address_id'])) ? $order_infos['shipping']['address_id'] : ''; ?>" />
46 46
 <?php endif; ?>
Please login to merge, or discard this patch.
templates/backend/customer-informations/customer_informations_form.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div class="wps-boxed">
4 4
 <div id="wps_signup_error_container"></div>
5 5
 	<?php
6
-	if( !empty($signup_fields) ) :
7
-		foreach( $signup_fields as $fields_section_name => $fields_section ) : ?>
8
-		<span class="wps-h4"><?php _e( $fields_section_name, 'wpshop' ); ?></span>
6
+	if (!empty($signup_fields)) :
7
+		foreach ($signup_fields as $fields_section_name => $fields_section) : ?>
8
+		<span class="wps-h4"><?php _e($fields_section_name, 'wpshop'); ?></span>
9 9
 		<div><?php
10
-			foreach( $fields_section as $signup_field ) :
11
-			$query = $wpdb->prepare( 'SELECT value  FROM '.WPSHOP_DBT_ATTRIBUTE_VALUES_PREFIX.strtolower($signup_field->data_type). ' WHERE entity_type_id = %d AND attribute_id = %d AND entity_id = %d ', $customer_entity_type_id, $signup_field->id, $cid );
10
+			foreach ($fields_section as $signup_field) :
11
+			$query = $wpdb->prepare('SELECT value  FROM ' . WPSHOP_DBT_ATTRIBUTE_VALUES_PREFIX . strtolower($signup_field->data_type) . ' WHERE entity_type_id = %d AND attribute_id = %d AND entity_id = %d ', $customer_entity_type_id, $signup_field->id, $cid);
12 12
 
13
-			$value = $wpdb->get_var( $query );
14
-			$attribute_output_def = wpshop_attributes::get_attribute_field_definition( $signup_field, $value, array( 'from' => 'frontend', array( 'options' => array( 'original' => true, ), ) ) );
13
+			$value = $wpdb->get_var($query);
14
+			$attribute_output_def = wpshop_attributes::get_attribute_field_definition($signup_field, $value, array('from' => 'frontend', array('options' => array('original' => true,),)));
15 15
 		?>
16 16
 			<div class="wps-form-group">
17
-				<label for="<?php echo $signup_field->code; ?>"><?php  _e( stripslashes($signup_field->frontend_label), 'wpshop'); ?><?php //echo ( ( !empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes' ) ? ' <em>*</em>' : '' ); ?></label>
17
+				<label for="<?php echo $signup_field->code; ?>"><?php  _e(stripslashes($signup_field->frontend_label), 'wpshop'); ?><?php //echo ( ( !empty($attribute_output_def['required']) && $attribute_output_def['required'] == 'yes' ) ? ' <em>*</em>' : '' ); ?></label>
18 18
 				<div id="<?php echo $signup_field->code; ?>" class="wps-form"><?php echo $attribute_output_def['output']; echo $attribute_output_def['options']; ?></div>
19 19
 			</div>
20 20
 		<?php
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
wps_customer/templates/backend/provider_products/product_provider.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div class="product" data-id="<?php echo $post->ID; ?>">
4 4
 	<h1 data-id="<?php echo $post->ID; ?>"><a href="#"><?php echo $post->post_title; ?></a></h1><a data-id="<?php echo $post->ID; ?>" class="delete_provider_btn" href="#">delete</a><input type="hidden" data-id="<?php echo $post->ID; ?>" class="special_provider" name="wps_provider_product[<?php echo $post->ID; ?>][special_provider]" value="update">
5 5
 	<div class="values" data-id="<?php echo $post->ID; ?>">
6 6
 		<div class="wps-form-group">
7
-			<label><?php _e( 'Product title', 'wpshop'); ?></label>
7
+			<label><?php _e('Product title', 'wpshop'); ?></label>
8 8
 			<div class="wps-form"><input type="text" name="wps_provider_product[<?php echo $post->ID; ?>][post_title]"  value="<?php echo $post->post_title; ?>" /></div>
9 9
 		</div>
10 10
 		<div class="wps-form-group">
11
-			<label><?php _e( 'Product description', 'wpshop'); ?> :</label>
12
-			<div class="wps-form"><textarea id="wps_product_description_<?php echo $post->ID; ?>" name="wps_provider_product[<?php echo $post->ID; ?>][post_content]"><?php echo nl2br( $post->post_content );?></textarea></div>
11
+			<label><?php _e('Product description', 'wpshop'); ?> :</label>
12
+			<div class="wps-form"><textarea id="wps_product_description_<?php echo $post->ID; ?>" name="wps_provider_product[<?php echo $post->ID; ?>][post_content]"><?php echo nl2br($post->post_content); ?></textarea></div>
13 13
 		</div>
14 14
 		<?php echo $attributes_display; ?>
15 15
 	</div>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
templates/backend/provider_products/product_provider_attribute.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 ?>
3 3
 <div class="wps-form-group">
4
-	<label><?php _e( $att['field_definition']['label'], 'wpshop' ); ?></label>
5
-	<div class="wps-form"><?php echo str_replace( 'name="wpshop_product_attribute', 'name="wps_provider_product[' .$post->ID. '][' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT . '_attribute]', $att['field_definition']['output'] ); ?></div>
4
+	<label><?php _e($att['field_definition']['label'], 'wpshop'); ?></label>
5
+	<div class="wps-form"><?php echo str_replace('name="wpshop_product_attribute', 'name="wps_provider_product[' . $post->ID . '][' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT . '_attribute]', $att['field_definition']['output']); ?></div>
6 6
 </div>
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * Fichier de définition du modèle des taxinomies / File for term model definition
4 6
  *
Please login to merge, or discard this patch.
wps_customer/templates/backend/customer_listtable/customer_orders.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,44 +1,44 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 
3 3
 	/**	Get customer orders list for statistic displaying	*/
4 4
 	$wps_orders_mdl = new wps_orders_mdl();
5
-	$orders = $wps_orders_mdl->get_customer_orders( $current_user_id_in_list );
6
-	$color_label = array( 'awaiting_payment' => 'jaune', 'canceled' => 'rouge', 'partially_paid' => 'orange', 'incorrect_amount' => 'orange', 'denied' => 'rouge', 'shipped' => 'bleu', 'pos' => 'bleu', 'payment_refused' => 'rouge', 'completed' => 'vert', 'refunded' => 'rouge');
5
+	$orders = $wps_orders_mdl->get_customer_orders($current_user_id_in_list);
6
+	$color_label = array('awaiting_payment' => 'jaune', 'canceled' => 'rouge', 'partially_paid' => 'orange', 'incorrect_amount' => 'orange', 'denied' => 'rouge', 'shipped' => 'bleu', 'pos' => 'bleu', 'payment_refused' => 'rouge', 'completed' => 'vert', 'refunded' => 'rouge');
7 7
 
8
-if ( !empty( $orders ) ) :
9
-	$currency = wpshop_tools::wpshop_get_currency( false );
10
-	$orders_status = unserialize( WPSHOP_ORDER_STATUS );
8
+if (!empty($orders)) :
9
+	$currency = wpshop_tools::wpshop_get_currency(false);
10
+	$orders_status = unserialize(WPSHOP_ORDER_STATUS);
11 11
 
12 12
 	$customer_order_total_amount = $customer_order_real_total_amount = 0;
13 13
 	$order_statuses = array();
14 14
 	$ordered_products = array();
15
-	foreach( $orders as $order ) :
16
-		$order_meta = get_post_meta( $order->ID, '_order_postmeta', true );
15
+	foreach ($orders as $order) :
16
+		$order_meta = get_post_meta($order->ID, '_order_postmeta', true);
17 17
 
18
-		if ( empty( $order_statuses[ $order_meta['order_status'] ] ) ) {
19
-			$order_statuses[ $order_meta['order_status'] ] = 1;
18
+		if (empty($order_statuses[$order_meta['order_status']])) {
19
+			$order_statuses[$order_meta['order_status']] = 1;
20 20
 		}
21 21
 		else {
22
-			$order_statuses[ $order_meta['order_status'] ] += 1;
22
+			$order_statuses[$order_meta['order_status']] += 1;
23 23
 		}
24 24
 
25 25
 		$customer_order_total_amount += $order_meta['order_grand_total'];
26
-		if ( 'completed' == $order_meta['order_status'] ) {
26
+		if ('completed' == $order_meta['order_status']) {
27 27
 			$customer_order_real_total_amount += $order_meta['order_grand_total'];
28 28
 		}
29 29
 
30
-		if ( !empty( $order_meta ) && !empty( $order_meta[ 'order_items' ] ) ) {
31
-			foreach ( $order_meta[ 'order_items' ] as $order_item ) :
32
-				$ordered_products[ $order_item[ 'item_id' ] ] = $order_item[ 'item_name' ];
30
+		if (!empty($order_meta) && !empty($order_meta['order_items'])) {
31
+			foreach ($order_meta['order_items'] as $order_item) :
32
+				$ordered_products[$order_item['item_id']] = $order_item['item_name'];
33 33
 			endforeach;
34 34
 		}
35 35
 	endforeach;
36 36
 
37 37
 	$order_list = '  ';
38
-	foreach ( $order_statuses as $order_status => $nb_of_order_with_status ) :
38
+	foreach ($order_statuses as $order_status => $nb_of_order_with_status) :
39 39
 		ob_start();
40 40
 ?>
41
-		<span class="wps-label-<?php echo $color_label[ strtolower($order_status) ]; ?>"><?php printf( __( '%2$s %1$s', 'wpshop' ), __( $orders_status[ strtolower($order_status) ], 'wpshop' ), $nb_of_order_with_status ); ?></span>
41
+		<span class="wps-label-<?php echo $color_label[strtolower($order_status)]; ?>"><?php printf(__('%2$s %1$s', 'wpshop'), __($orders_status[strtolower($order_status)], 'wpshop'), $nb_of_order_with_status); ?></span>
42 42
 <?php
43 43
 		$order_list .= ob_get_contents();
44 44
 		ob_end_clean();
@@ -47,17 +47,17 @@  discard block
 block discarded – undo
47 47
 ?>
48 48
 <ul class="wp-shop-customers-list-orders-stats" >
49 49
 	<li>
50
-		<?php printf( __( 'Orders total number : %d', 'wpshop' ), count( $orders ) ); ?>  <?php echo mb_substr( $order_list, 0, -2, 'UTF-8' ); ?>
50
+		<?php printf(__('Orders total number : %d', 'wpshop'), count($orders)); ?>  <?php echo mb_substr($order_list, 0, -2, 'UTF-8'); ?>
51 51
 	</li>
52 52
 	<li>
53
-		<?php printf( __( 'Orders total amount : %s', 'wpshop' ), wpshop_tools::formate_number( $customer_order_real_total_amount ).' '.$currency ); ?>
54
-		<?php if ( !empty( $customer_order_total_amount ) && ( $customer_order_total_amount != $customer_order_real_total_amount ) ) : ?>( <?php printf( __( 'If all orders were paid : %s', 'wpshop' ), wpshop_tools::formate_number( $customer_order_total_amount ).' '.$currency ); ?> )<?php endif; ?>
53
+		<?php printf(__('Orders total amount : %s', 'wpshop'), wpshop_tools::formate_number($customer_order_real_total_amount) . ' ' . $currency); ?>
54
+		<?php if (!empty($customer_order_total_amount) && ($customer_order_total_amount != $customer_order_real_total_amount)) : ?>( <?php printf(__('If all orders were paid : %s', 'wpshop'), wpshop_tools::formate_number($customer_order_total_amount) . ' ' . $currency); ?> )<?php endif; ?>
55 55
 	</li>
56 56
 </ul>
57 57
 <div class="wp-shop-customers-list-ordered-product" >
58
-	<p><?php _e( 'List of ordered product', 'wpshop' ); ?></p>
59
-	<?php echo implode( ', ', $ordered_products ); ?>
58
+	<p><?php _e('List of ordered product', 'wpshop'); ?></p>
59
+	<?php echo implode(', ', $ordered_products); ?>
60 60
 </div>
61 61
 <?php else: ?>
62
-	<div class="wps-alert-info"><?php _e( 'No order have been created for the moment', 'wpshop'); ?></div>
62
+	<div class="wps-alert-info"><?php _e('No order have been created for the moment', 'wpshop'); ?></div>
63 63
 <?php endif; ?>
64 64
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 
3 5
 	/**	Get customer orders list for statistic displaying	*/
4 6
 	$wps_orders_mdl = new wps_orders_mdl();
@@ -17,8 +19,7 @@  discard block
 block discarded – undo
17 19
 
18 20
 		if ( empty( $order_statuses[ $order_meta['order_status'] ] ) ) {
19 21
 			$order_statuses[ $order_meta['order_status'] ] = 1;
20
-		}
21
-		else {
22
+		} else {
22 23
 			$order_statuses[ $order_meta['order_status'] ] += 1;
23 24
 		}
24 25
 
@@ -58,6 +59,9 @@  discard block
 block discarded – undo
58 59
 	<p><?php _e( 'List of ordered product', 'wpshop' ); ?></p>
59 60
 	<?php echo implode( ', ', $ordered_products ); ?>
60 61
 </div>
61
-<?php else: ?>
62
-	<div class="wps-alert-info"><?php _e( 'No order have been created for the moment', 'wpshop'); ?></div>
62
+<?php else {
63
+	: ?>
64
+	<div class="wps-alert-info"><?php _e( 'No order have been created for the moment', 'wpshop');
65
+}
66
+?></div>
63 67
 <?php endif; ?>
64 68
\ No newline at end of file
Please login to merge, or discard this patch.
modules/wps_customer/templates/backend/customer_listtable/customer_name.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
  echo $customer_post->post_title; ?>
3 3
 
4 4
 <div class="wps-customer-name-container" >
5 5
 	<div class="wps-customer-last_name" >
6
-	<?php if ( !empty( $current_user_datas->last_name ) ) : ?>
6
+	<?php if (!empty($current_user_datas->last_name)) : ?>
7 7
 		<?php echo $current_user_datas->last_name; ?>
8 8
 	<?php else: ?>
9 9
 		-
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 	</div>
12 12
 
13 13
 	<div class="wps-customer-first_name" >
14
-	<?php if ( !empty( $current_user_datas->first_name ) ) : ?>
14
+	<?php if (!empty($current_user_datas->first_name)) : ?>
15 15
 		<?php echo $current_user_datas->first_name; ?>
16 16
 	<?php else: ?>
17 17
 		-
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 </div>
21 21
 
22 22
 <div class="row-actions" >
23
-	<a href="<?php echo admin_url( 'post.php?post=' . $post_id . '&amp;action=edit' ); ?>" ><?php _e( 'View' ); ?></a> |
24
-	<?php if ( current_user_can( 'edit_users' ) ) : ?>
25
-	<a target="_wps_wpuser_edition_page" href="<?php echo admin_url( 'user-edit.php?user_id=' . $current_user_id_in_list  ); ?>" ><?php printf( __( 'View associated user (%d)', 'wpshop' ), $current_user_id_in_list ); ?></a>
23
+	<a href="<?php echo admin_url('post.php?post=' . $post_id . '&amp;action=edit'); ?>" ><?php _e('View'); ?></a> |
24
+	<?php if (current_user_can('edit_users')) : ?>
25
+	<a target="_wps_wpuser_edition_page" href="<?php echo admin_url('user-edit.php?user_id=' . $current_user_id_in_list); ?>" ><?php printf(__('View associated user (%d)', 'wpshop'), $current_user_id_in_list); ?></a>
26 26
 	<?php else: ?>
27
-	<?php printf( __( 'WP-User %d', 'wpshop' ), $current_user_id_in_list); ?>
27
+	<?php printf(__('WP-User %d', 'wpshop'), $current_user_id_in_list); ?>
28 28
 	<?php endif; ?>
29 29
 </div>
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +18 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,21 +1,29 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
  echo $customer_post->post_title; ?>
3 5
 
4 6
 <div class="wps-customer-name-container" >
5 7
 	<div class="wps-customer-last_name" >
6 8
 	<?php if ( !empty( $current_user_datas->last_name ) ) : ?>
7 9
 		<?php echo $current_user_datas->last_name; ?>
8
-	<?php else: ?>
10
+	<?php else {
11
+	: ?>
9 12
 		-
10
-	<?php endif; ?>
13
+	<?php endif;
14
+}
15
+?>
11 16
 	</div>
12 17
 
13 18
 	<div class="wps-customer-first_name" >
14 19
 	<?php if ( !empty( $current_user_datas->first_name ) ) : ?>
15 20
 		<?php echo $current_user_datas->first_name; ?>
16
-	<?php else: ?>
21
+	<?php else {
22
+	: ?>
17 23
 		-
18
-	<?php endif; ?>
24
+	<?php endif;
25
+}
26
+?>
19 27
 	</div>
20 28
 </div>
21 29
 
@@ -23,7 +31,10 @@  discard block
 block discarded – undo
23 31
 	<a href="<?php echo admin_url( 'post.php?post=' . $post_id . '&amp;action=edit' ); ?>" ><?php _e( 'View' ); ?></a> |
24 32
 	<?php if ( current_user_can( 'edit_users' ) ) : ?>
25 33
 	<a target="_wps_wpuser_edition_page" href="<?php echo admin_url( 'user-edit.php?user_id=' . $current_user_id_in_list  ); ?>" ><?php printf( __( 'View associated user (%d)', 'wpshop' ), $current_user_id_in_list ); ?></a>
26
-	<?php else: ?>
27
-	<?php printf( __( 'WP-User %d', 'wpshop' ), $current_user_id_in_list); ?>
34
+	<?php else {
35
+	: ?>
36
+	<?php printf( __( 'WP-User %d', 'wpshop' ), $current_user_id_in_list);
37
+}
38
+?>
28 39
 	<?php endif; ?>
29 40
 </div>
30 41
\ No newline at end of file
Please login to merge, or discard this patch.