@@ -14,36 +14,36 @@ discard block |
||
14 | 14 | |
15 | 15 | namespace wpshop; |
16 | 16 | |
17 | -defined( 'ABSPATH' ) || exit; ?> |
|
17 | +defined('ABSPATH') || exit; ?> |
|
18 | 18 | |
19 | 19 | <table class="wpeo-table"> |
20 | 20 | <thead> |
21 | 21 | <tr> |
22 | - <th><?php esc_html_e( 'Proposal', 'wpshop' ); ?></th> |
|
23 | - <th><?php esc_html_e( 'Date', 'wpshop' ); ?></th> |
|
24 | - <th><?php esc_html_e( 'Contenu', 'wpshop' ); ?></th> |
|
25 | - <th><?php esc_html_e( 'Status', 'wpshop' ); ?></th> |
|
26 | - <th><?php esc_html_e( 'Paiement', 'wpshop' ); ?></th> |
|
27 | - <th><?php esc_html_e( 'Montant', 'wpshop' ); ?></th> |
|
28 | - <th><?php esc_html_e( 'Facture', 'wpshop' ); ?></th> |
|
22 | + <th><?php esc_html_e('Proposal', 'wpshop'); ?></th> |
|
23 | + <th><?php esc_html_e('Date', 'wpshop'); ?></th> |
|
24 | + <th><?php esc_html_e('Contenu', 'wpshop'); ?></th> |
|
25 | + <th><?php esc_html_e('Status', 'wpshop'); ?></th> |
|
26 | + <th><?php esc_html_e('Paiement', 'wpshop'); ?></th> |
|
27 | + <th><?php esc_html_e('Montant', 'wpshop'); ?></th> |
|
28 | + <th><?php esc_html_e('Facture', 'wpshop'); ?></th> |
|
29 | 29 | </tr> |
30 | 30 | </thead> |
31 | 31 | |
32 | 32 | <tbody> |
33 | 33 | <?php |
34 | - if ( ! empty( $proposals ) ) : |
|
35 | - foreach ( $proposals as $proposal ) : |
|
34 | + if (!empty($proposals)) : |
|
35 | + foreach ($proposals as $proposal) : |
|
36 | 36 | ?> |
37 | 37 | <tr> |
38 | - <td>#<?php echo esc_html( $proposal->data['id'] ); ?></td> |
|
39 | - <td><?php echo esc_html( $proposal->data['date_commande']['rendered']['date'] ); ?></td> |
|
38 | + <td>#<?php echo esc_html($proposal->data['id']); ?></td> |
|
39 | + <td><?php echo esc_html($proposal->data['date_commande']['rendered']['date']); ?></td> |
|
40 | 40 | <td> |
41 | 41 | <ul> |
42 | 42 | <?php |
43 | - if ( ! empty( $proposal->data['lines'] ) ) : |
|
44 | - foreach ( $proposal->data['lines'] as $line ) : |
|
43 | + if (!empty($proposal->data['lines'])) : |
|
44 | + foreach ($proposal->data['lines'] as $line) : |
|
45 | 45 | ?> |
46 | - <li><?php echo esc_html( $line['libelle'] ); ?> - <?php echo esc_html( $line['price'] ); ?>€</li> |
|
46 | + <li><?php echo esc_html($line['libelle']); ?> - <?php echo esc_html($line['price']); ?>€</li> |
|
47 | 47 | <?php |
48 | 48 | endforeach; |
49 | 49 | endif; |
@@ -52,12 +52,12 @@ discard block |
||
52 | 52 | </td> |
53 | 53 | <td>Non validée</td> |
54 | 54 | <td>-</td> |
55 | - <td><?php echo esc_html( $proposal->data['total_ttc'] ); ?>€</td> |
|
55 | + <td><?php echo esc_html($proposal->data['total_ttc']); ?>€</td> |
|
56 | 56 | <td> |
57 | 57 | <?php |
58 | - if ( ! empty( $proposal->data['invoice'] ) ) : |
|
58 | + if (!empty($proposal->data['invoice'])) : |
|
59 | 59 | ?> |
60 | - <a target="_blank" href="<?php echo esc_attr( admin_url( 'admin-post.php?action=wps_download_invoice&order_id=' . $proposal->data['id'] ) ); ?>"><i class="fas fa-file-download"></i></a> |
|
60 | + <a target="_blank" href="<?php echo esc_attr(admin_url('admin-post.php?action=wps_download_invoice&order_id=' . $proposal->data['id'])); ?>"><i class="fas fa-file-download"></i></a> |
|
61 | 61 | <?php |
62 | 62 | endif; |
63 | 63 | ?> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | namespace wpshop; |
16 | 16 | |
17 | -defined( 'ABSPATH' ) || exit; ?> |
|
17 | +defined('ABSPATH') || exit; ?> |
|
18 | 18 | |
19 | 19 | <table class="wpeo-table"> |
20 | 20 | <thead> |
@@ -32,35 +32,35 @@ discard block |
||
32 | 32 | |
33 | 33 | <tbody> |
34 | 34 | <?php |
35 | - if ( ! empty( $invoices ) ) : |
|
36 | - foreach ( $invoices as $invoice ) : |
|
35 | + if (!empty($invoices)) : |
|
36 | + foreach ($invoices as $invoice) : |
|
37 | 37 | ?> |
38 | 38 | <tr> |
39 | 39 | <td> |
40 | - #<?php echo esc_html( $invoice->data['title'] ); ?> |
|
40 | + #<?php echo esc_html($invoice->data['title']); ?> |
|
41 | 41 | </td> |
42 | 42 | <td> |
43 | - #<?php echo esc_html( $invoice->data['order']->data['title'] ); ?> |
|
43 | + #<?php echo esc_html($invoice->data['order']->data['title']); ?> |
|
44 | 44 | </td> |
45 | - <td><?php echo esc_html( $invoice->data['date']['rendered']['date'] ); ?></td> |
|
45 | + <td><?php echo esc_html($invoice->data['date']['rendered']['date']); ?></td> |
|
46 | 46 | <td> |
47 | 47 | <ul> |
48 | 48 | <?php |
49 | - if ( ! empty( $invoice->data['lines'] ) ) : |
|
50 | - foreach ( $invoice->data['lines'] as $line ) : |
|
49 | + if (!empty($invoice->data['lines'])) : |
|
50 | + foreach ($invoice->data['lines'] as $line) : |
|
51 | 51 | ?> |
52 | - <li><?php echo esc_html( $line['libelle'] ); ?> x<?php echo esc_html( $line['qty'] ); ?> - <?php echo esc_html( number_format( $line['total_ht'], 2, ',', '' ) ); ?>€</li> |
|
52 | + <li><?php echo esc_html($line['libelle']); ?> x<?php echo esc_html($line['qty']); ?> - <?php echo esc_html(number_format($line['total_ht'], 2, ',', '')); ?>€</li> |
|
53 | 53 | <?php |
54 | 54 | endforeach; |
55 | 55 | endif; |
56 | 56 | ?> |
57 | 57 | </ul> |
58 | 58 | </td> |
59 | - <td><?php echo esc_html( Payment::g()->convert_status( $invoice->data ) ); ?></td> |
|
60 | - <td><?php echo esc_html( $invoice->data['payment_method'] ); ?></td> |
|
61 | - <td><?php echo esc_html( $invoice->data['total_ttc'] ); ?>€</td> |
|
59 | + <td><?php echo esc_html(Payment::g()->convert_status($invoice->data)); ?></td> |
|
60 | + <td><?php echo esc_html($invoice->data['payment_method']); ?></td> |
|
61 | + <td><?php echo esc_html($invoice->data['total_ttc']); ?>€</td> |
|
62 | 62 | <td> |
63 | - <a target="_blank" href="<?php echo esc_attr( admin_url( 'admin-post.php?action=wps_download_invoice&order_id=' . $invoice->data['order']->data['id'] ) ); ?>"><i class="fas fa-file-download"></i></a> </td> |
|
63 | + <a target="_blank" href="<?php echo esc_attr(admin_url('admin-post.php?action=wps_download_invoice&order_id=' . $invoice->data['order']->data['id'])); ?>"><i class="fas fa-file-download"></i></a> </td> |
|
64 | 64 | </tr> |
65 | 65 | <?php |
66 | 66 | endforeach; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | namespace wpshop; |
16 | 16 | |
17 | -defined( 'ABSPATH' ) || exit; ?> |
|
17 | +defined('ABSPATH') || exit; ?> |
|
18 | 18 | |
19 | 19 | <ul> |
20 | 20 | <li> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | namespace wpshop; |
16 | 16 | |
17 | -defined( 'ABSPATH' ) || exit; |
|
17 | +defined('ABSPATH') || exit; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Doli Third Parties class. |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @since 2.0.0 |
39 | 39 | */ |
40 | - public function doli_to_wp( $doli_third_party, $wp_third_party ) { |
|
41 | - $wp_third_party->data['external_id'] = (int) $doli_third_party->id; |
|
40 | + public function doli_to_wp($doli_third_party, $wp_third_party) { |
|
41 | + $wp_third_party->data['external_id'] = (int)$doli_third_party->id; |
|
42 | 42 | $wp_third_party->data['title'] = $doli_third_party->name; |
43 | 43 | $wp_third_party->data['address'] = $doli_third_party->address; |
44 | 44 | $wp_third_party->data['town'] = $doli_third_party->town; |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | $wp_third_party->data['email'] = $doli_third_party->email; |
50 | 50 | $wp_third_party->data['status'] = 'publish'; |
51 | 51 | |
52 | - if ( ! empty( $doli_third_party->date_modification ) ) { |
|
53 | - $wp_third_party->data['date_modified'] = date( 'Y-m-d H:i:s', $doli_third_party->date_modification ); |
|
52 | + if (!empty($doli_third_party->date_modification)) { |
|
53 | + $wp_third_party->data['date_modified'] = date('Y-m-d H:i:s', $doli_third_party->date_modification); |
|
54 | 54 | } |
55 | 55 | |
56 | - Third_Party::g()->update( $wp_third_party->data ); |
|
56 | + Third_Party::g()->update($wp_third_party->data); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @param stdClass $doli_third_party Les données du tier venant |
66 | 66 | * de dolibarr. |
67 | 67 | */ |
68 | - public function wp_to_doli( $wp_third_party, $doli_third_party ) { |
|
68 | + public function wp_to_doli($wp_third_party, $doli_third_party) { |
|
69 | 69 | $data = array( |
70 | 70 | 'name' => $wp_third_party->data['title'], |
71 | 71 | 'country' => $wp_third_party->data['country'], |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | 'state' => $wp_third_party->data['state'], |
76 | 76 | ); |
77 | 77 | |
78 | - if ( ! empty( $wp_third_party->data['external_id'] ) ) { |
|
79 | - Request_Util::put( 'thirdparties/' . $doli_third_party->id, $data ); |
|
78 | + if (!empty($wp_third_party->data['external_id'])) { |
|
79 | + Request_Util::put('thirdparties/' . $doli_third_party->id, $data); |
|
80 | 80 | } else { |
81 | - $doli_third_party_id = Request_Util::post( 'thirdparties', $data ); |
|
81 | + $doli_third_party_id = Request_Util::post('thirdparties', $data); |
|
82 | 82 | $wp_third_party->data['external_id'] = $doli_third_party_id; |
83 | 83 | |
84 | - Third_Party::g()->update( $wp_third_party->data ); |
|
84 | + Third_Party::g()->update($wp_third_party->data); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
@@ -94,11 +94,11 @@ discard block |
||
94 | 94 | * |
95 | 95 | * @return integer L'ID WP du tier. |
96 | 96 | */ |
97 | - public function get_wp_id_by_doli_id( $doli_id ) { |
|
98 | - $third_party = Third_Party::g()->get( array( |
|
97 | + public function get_wp_id_by_doli_id($doli_id) { |
|
98 | + $third_party = Third_Party::g()->get(array( |
|
99 | 99 | 'meta_key' => '_external_id', |
100 | - 'meta_value' => (int) $doli_id, |
|
101 | - ), true ); // WPCS: slow query ok. |
|
100 | + 'meta_value' => (int)$doli_id, |
|
101 | + ), true); // WPCS: slow query ok. |
|
102 | 102 | |
103 | 103 | return $third_party->data['id']; |
104 | 104 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | namespace wpshop; |
17 | 17 | |
18 | -defined( 'ABSPATH' ) || exit; |
|
18 | +defined('ABSPATH') || exit; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Doli Third Parties Filter Class. |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @since 2.0.0 |
29 | 29 | */ |
30 | 30 | public function __construct() { |
31 | - add_filter( 'wps_save_and_associate_contact', array( $this, 'add_contact_soc' ), 10, 2 ); |
|
31 | + add_filter('wps_save_and_associate_contact', array($this, 'add_contact_soc'), 10, 2); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @return Contact_Model Les données du contact avec l'ID |
43 | 43 | * du tier. |
44 | 44 | */ |
45 | - public function add_contact_soc( $contact, $third_party ) { |
|
45 | + public function add_contact_soc($contact, $third_party) { |
|
46 | 46 | $contact['third_party_id'] = $third_party->data['external_id']; |
47 | 47 | |
48 | 48 | return $contact; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | namespace wpshop; |
16 | 16 | |
17 | -defined( 'ABSPATH' ) || exit; |
|
17 | +defined('ABSPATH') || exit; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Doli Third Parties Action Class. |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | * @since 2.0.0 |
28 | 28 | */ |
29 | 29 | public function __construct() { |
30 | - add_action( 'wps_checkout_create_third_party', array( $this, 'checkout_create_third_party' ) ); |
|
31 | - add_action( 'wps_saved_third_party', array( $this, 'save_third_party' ) ); |
|
32 | - add_action( 'wps_saved_billing_address', array( $this, 'update_billing_address' ) ); |
|
30 | + add_action('wps_checkout_create_third_party', array($this, 'checkout_create_third_party')); |
|
31 | + add_action('wps_saved_third_party', array($this, 'save_third_party')); |
|
32 | + add_action('wps_saved_billing_address', array($this, 'update_billing_address')); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @param Third_Party_Model $wp_third_party Les données du tier depuis WP. |
41 | 41 | */ |
42 | - public function checkout_create_third_party( $wp_third_party ) { |
|
43 | - Doli_Third_Parties::g()->wp_to_doli( $wp_third_party, null ); |
|
42 | + public function checkout_create_third_party($wp_third_party) { |
|
43 | + Doli_Third_Parties::g()->wp_to_doli($wp_third_party, null); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -54,17 +54,17 @@ discard block |
||
54 | 54 | * |
55 | 55 | * @return integer ID du tier venant de Dolibarr. |
56 | 56 | */ |
57 | - public function save_third_party( $third_party ) { |
|
57 | + public function save_third_party($third_party) { |
|
58 | 58 | $third_party_id = $third_party['external_id']; |
59 | 59 | |
60 | - if ( ! empty( $third_party['external_id'] ) ) { |
|
61 | - Request_Util::put( 'thirdparties/' . $third_party['external_id'], array( |
|
60 | + if (!empty($third_party['external_id'])) { |
|
61 | + Request_Util::put('thirdparties/' . $third_party['external_id'], array( |
|
62 | 62 | 'name' => $third_party['title'], |
63 | - ) ); |
|
63 | + )); |
|
64 | 64 | } else { |
65 | - $third_party_id = Request_Util::post( 'thirdparties', array( |
|
65 | + $third_party_id = Request_Util::post('thirdparties', array( |
|
66 | 66 | 'name' => $third_party['title'], |
67 | - ) ); |
|
67 | + )); |
|
68 | 68 | } |
69 | 69 | return $third_party_id; |
70 | 70 | } |
@@ -76,14 +76,14 @@ discard block |
||
76 | 76 | * |
77 | 77 | * @param Third_Party_Model $third_party Les données du tier venant de WP. |
78 | 78 | */ |
79 | - public function update_billing_address( $third_party ) { |
|
80 | - $third_party_id = Request_Util::put( 'thirdparties/ ' . $third_party->data['external_id'], array( |
|
79 | + public function update_billing_address($third_party) { |
|
80 | + $third_party_id = Request_Util::put('thirdparties/ ' . $third_party->data['external_id'], array( |
|
81 | 81 | 'name' => $third_party->data['title'], |
82 | 82 | 'address' => $third_party->data['address'], |
83 | 83 | 'town' => $third_party->data['town'], |
84 | 84 | 'zip' => $third_party->data['zip'], |
85 | 85 | 'email' => $third_party->data['email'], |
86 | - ) ); |
|
86 | + )); |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | namespace wpshop; |
16 | 16 | |
17 | -defined( 'ABSPATH' ) || exit; |
|
17 | +defined('ABSPATH') || exit; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Doli Payement Model. |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @param Product $object Les données de l'objet. |
30 | 30 | * @param string $req_method La méthode de la requête. |
31 | 31 | */ |
32 | - public function __construct( $object, $req_method = null ) { |
|
32 | + public function __construct($object, $req_method = null) { |
|
33 | 33 | $this->schema['payment_type'] = array( |
34 | 34 | 'type' => 'string', |
35 | 35 | 'meta_type' => 'single', |
@@ -46,6 +46,6 @@ discard block |
||
46 | 46 | 'description' => '', |
47 | 47 | ); |
48 | 48 | |
49 | - parent::__construct( $object, $req_method ); |
|
49 | + parent::__construct($object, $req_method); |
|
50 | 50 | } |
51 | 51 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | namespace wpshop; |
16 | 16 | |
17 | -defined( 'ABSPATH' ) || exit; |
|
17 | +defined('ABSPATH') || exit; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Settings Class. |
@@ -55,12 +55,12 @@ discard block |
||
55 | 55 | * |
56 | 56 | * @since 2.0.0 |
57 | 57 | */ |
58 | - public function display_general( $section = '' ) { |
|
59 | - $dolibarr_option = get_option( 'wps_dolibarr', $this->default_settings ); |
|
58 | + public function display_general($section = '') { |
|
59 | + $dolibarr_option = get_option('wps_dolibarr', $this->default_settings); |
|
60 | 60 | |
61 | - \eoxia\View_Util::exec( 'wpshop', 'settings', 'general', array( |
|
61 | + \eoxia\View_Util::exec('wpshop', 'settings', 'general', array( |
|
62 | 62 | 'dolibarr_option' => $dolibarr_option, |
63 | - ) ); |
|
63 | + )); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -70,20 +70,20 @@ discard block |
||
70 | 70 | * |
71 | 71 | * @since 2.0.0 |
72 | 72 | */ |
73 | - public function display_pages( $section = '' ) { |
|
73 | + public function display_pages($section = '') { |
|
74 | 74 | $pages = get_pages(); |
75 | 75 | |
76 | - array_unshift( $pages, (object) array( |
|
76 | + array_unshift($pages, (object)array( |
|
77 | 77 | 'ID' => 0, |
78 | - 'post_title' => __( 'No page', 'wpshop' ), |
|
79 | - ) ); |
|
78 | + 'post_title' => __('No page', 'wpshop'), |
|
79 | + )); |
|
80 | 80 | |
81 | - $page_ids_options = get_option( 'wps_page_ids', Pages::g()->default_options ); |
|
81 | + $page_ids_options = get_option('wps_page_ids', Pages::g()->default_options); |
|
82 | 82 | |
83 | - \eoxia\View_Util::exec( 'wpshop', 'settings', 'pages', array( |
|
83 | + \eoxia\View_Util::exec('wpshop', 'settings', 'pages', array( |
|
84 | 84 | 'pages' => $pages, |
85 | 85 | 'page_ids_options' => $page_ids_options, |
86 | - ) ); |
|
86 | + )); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -93,22 +93,22 @@ discard block |
||
93 | 93 | * |
94 | 94 | * @since 2.0.0 |
95 | 95 | */ |
96 | - public function display_emails( $section = '' ) { |
|
97 | - if ( ! empty( $section ) ) { |
|
98 | - $email = Emails::g()->emails[ $section ]; |
|
99 | - $path_to_template = Emails::g()->get_path( $email['filename_template'] ); |
|
100 | - $content = file_get_contents( $path_to_template ); |
|
96 | + public function display_emails($section = '') { |
|
97 | + if (!empty($section)) { |
|
98 | + $email = Emails::g()->emails[$section]; |
|
99 | + $path_to_template = Emails::g()->get_path($email['filename_template']); |
|
100 | + $content = file_get_contents($path_to_template); |
|
101 | 101 | |
102 | - \eoxia\View_Util::exec( 'wpshop', 'settings', 'email-single', array( |
|
102 | + \eoxia\View_Util::exec('wpshop', 'settings', 'email-single', array( |
|
103 | 103 | 'section' => $section, |
104 | 104 | 'email' => $email, |
105 | 105 | 'content' => $content, |
106 | - 'is_override' => Emails::g()->is_override( $email['filename_template'] ), |
|
107 | - ) ); |
|
106 | + 'is_override' => Emails::g()->is_override($email['filename_template']), |
|
107 | + )); |
|
108 | 108 | } else { |
109 | - \eoxia\View_Util::exec( 'wpshop', 'settings', 'emails', array( |
|
109 | + \eoxia\View_Util::exec('wpshop', 'settings', 'emails', array( |
|
110 | 110 | 'emails' => Emails::g()->emails, |
111 | - ) ); |
|
111 | + )); |
|
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
@@ -119,20 +119,20 @@ discard block |
||
119 | 119 | * |
120 | 120 | * @since 2.0.0 |
121 | 121 | */ |
122 | - public function display_payment_method( $section = '' ) { |
|
123 | - $payment_methods = get_option( 'wps_payment_methods', Payment::g()->default_options ); |
|
124 | - if ( ! empty( $section ) ) { |
|
122 | + public function display_payment_method($section = '') { |
|
123 | + $payment_methods = get_option('wps_payment_methods', Payment::g()->default_options); |
|
124 | + if (!empty($section)) { |
|
125 | 125 | $payment_methods = $payment_methods; |
126 | - $payment = $payment_methods[ $section ]; |
|
126 | + $payment = $payment_methods[$section]; |
|
127 | 127 | |
128 | - \eoxia\View_Util::exec( 'wpshop', 'settings', 'payment-method-single', array( |
|
128 | + \eoxia\View_Util::exec('wpshop', 'settings', 'payment-method-single', array( |
|
129 | 129 | 'section' => $section, |
130 | 130 | 'payment' => $payment, |
131 | - ) ); |
|
131 | + )); |
|
132 | 132 | } else { |
133 | - \eoxia\View_Util::exec( 'wpshop', 'settings', 'payment-method', array( |
|
133 | + \eoxia\View_Util::exec('wpshop', 'settings', 'payment-method', array( |
|
134 | 134 | 'payment_methods' => $payment_methods, |
135 | - ) ); |
|
135 | + )); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
@@ -143,24 +143,24 @@ discard block |
||
143 | 143 | * |
144 | 144 | * @since 2.0.0 |
145 | 145 | */ |
146 | - public function display_shipping_cost( $section = '' ) { |
|
147 | - $shipping_cost_option = get_option( 'wps_shipping_cost', Settings::g()->shipping_cost_default_settings ); |
|
146 | + public function display_shipping_cost($section = '') { |
|
147 | + $shipping_cost_option = get_option('wps_shipping_cost', Settings::g()->shipping_cost_default_settings); |
|
148 | 148 | |
149 | 149 | $products = Product::g()->get(); |
150 | 150 | |
151 | - $no_product = (object) array( |
|
151 | + $no_product = (object)array( |
|
152 | 152 | 'data' => array( |
153 | 153 | 'id' => 0, |
154 | - 'title' => __( 'No product', 'wpshop' ), |
|
154 | + 'title' => __('No product', 'wpshop'), |
|
155 | 155 | ), |
156 | 156 | ); |
157 | 157 | |
158 | - array_unshift( $products, $no_product ); |
|
158 | + array_unshift($products, $no_product); |
|
159 | 159 | |
160 | - \eoxia\View_Util::exec( 'wpshop', 'settings', 'shipping-cost', array( |
|
160 | + \eoxia\View_Util::exec('wpshop', 'settings', 'shipping-cost', array( |
|
161 | 161 | 'shipping_cost_option' => $shipping_cost_option, |
162 | 162 | 'products' => $products, |
163 | - ) ); |
|
163 | + )); |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 |
@@ -14,6 +14,6 @@ |
||
14 | 14 | |
15 | 15 | namespace wpshop; |
16 | 16 | |
17 | -defined( 'ABSPATH' ) || exit; ?> |
|
17 | +defined('ABSPATH') || exit; ?> |
|
18 | 18 | |
19 | 19 | Delivery method |