Passed
Pull Request — master (#42)
by pablo
03:08
created
templates/checkout_description.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
                     selector: '.pagantisSimulator',
38 38
                     totalAmount: '<?php echo $total; ?>',
39 39
                     totalPromotedAmount: '<?php echo $promoted_amount; ?>',
40
-                    skin : <?php echo $pagantisSimulatorSkin;?>,
40
+                    skin : <?php echo $pagantisSimulatorSkin; ?>,
41 41
                     locale: locale,
42 42
                     country: country
43 43
                 });
Please login to merge, or discard this patch.
templates/product_simulator.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <script>
2 2
     function findPriceSelector()
3 3
     {
4
-        var priceSelectors = <?php echo json_encode($priceSelector);?>;
4
+        var priceSelectors = <?php echo json_encode($priceSelector); ?>;
5 5
         return priceSelectors.find(function(candidateSelector) {
6 6
             var priceDOM = document.querySelector(candidateSelector);
7 7
             return (priceDOM != null );
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
     function findPositionSelector()
13 13
     {
14
-        var positionSelector = '<?php echo $positionSelector;?>';
14
+        var positionSelector = '<?php echo $positionSelector; ?>';
15 15
         if (positionSelector === 'default') {
16 16
             positionSelector = '.pagantisSimulator';
17 17
         }
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     function findQuantitySelector()
23 23
     {
24
-        var quantitySelectors = <?php echo json_encode($quantitySelector);?>;
24
+        var quantitySelectors = <?php echo json_encode($quantitySelector); ?>;
25 25
         return quantitySelectors.find(function(candidateSelector) {
26 26
             var priceDOM = document.querySelector(candidateSelector);
27 27
             return (priceDOM != null );
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     function findDestinationSim()
51 51
     {
52
-        var destinationSim = '<?php echo $finalDestination;?>';
52
+        var destinationSim = '<?php echo $finalDestination; ?>';
53 53
         if (destinationSim === 'default' || destinationSim == '') {
54 54
             destinationSim = 'woocommerce-product-details__short-description';
55 55
         }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     function prependSeparator()
78 78
     {
79 79
         var node = document.querySelector(findPositionSelector());
80
-        var textnode = document.createTextNode(<?php echo json_encode($separator);?>);
80
+        var textnode = document.createTextNode(<?php echo json_encode($separator); ?>);
81 81
         var spannode = document.createElement("span");
82 82
         spannode.style.cssText = 'margin-right:5px';
83 83
         spannode.appendChild(textnode);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         var positionSelector = findPositionSelector();
104 104
         var priceSelector = findPriceSelector();
105
-        var promotedProduct = '<?php echo $promoted;?>';
105
+        var promotedProduct = '<?php echo $promoted; ?>';
106 106
         var quantitySelector = findQuantitySelector();
107 107
 
108 108
         simulator_options = {
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
             country: country,
115 115
             itemAmountSelector: priceSelector,
116 116
             amountParserConfig :  {
117
-                thousandSeparator: '<?php echo $thousandSeparator;?>',
118
-                decimalSeparator: '<?php echo $decimalSeparator;?>'
117
+                thousandSeparator: '<?php echo $thousandSeparator; ?>',
118
+                decimalSeparator: '<?php echo $decimalSeparator; ?>'
119 119
             },
120
-            numInstalments : '<?php echo $pagantisQuotesStart;?>',
121
-            skin : <?php echo $pagantisSimulatorSkin;?>,
122
-            position: <?php echo $pagantisSimulatorPosition;?>
120
+            numInstalments : '<?php echo $pagantisQuotesStart; ?>',
121
+            skin : <?php echo $pagantisSimulatorSkin; ?>,
122
+            position: <?php echo $pagantisSimulatorPosition; ?>
123 123
         };
124 124
 
125 125
         window.pgSDK = sdk;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     {
149 149
         if (window.WCSimulatorId != '')
150 150
         {
151
-            var updateSelector = '<?php echo $variationSelector;?>';
151
+            var updateSelector = '<?php echo $variationSelector; ?>';
152 152
 
153 153
             if (updateSelector == 'default' || updateSelector === '')
154 154
             {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     }
182 182
 </style>
183 183
 <?php
184
-if ($promoted == 'true') {
184
+if ($promoted=='true') {
185 185
     echo $promotedMessage;
186 186
 }
187 187
 ?>
Please login to merge, or discard this patch.
WC_Pagantis.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -33,27 +33,27 @@  discard block
 block discarded – undo
33 33
     const ORDERS_TABLE = 'posts';
34 34
 
35 35
     public $defaultConfigs = array(
36
-       'PAGANTIS_TITLE'=>'Pago en cuotas',
37
-       'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'sdk.simulator.types.SELECTABLE_TEXT_CUSTOM',
38
-       'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'sdk.simulator.skins.BLUE',
39
-       'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
40
-       'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3,
41
-       'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12,
42
-       'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
43
-       'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'sdk.simulator.positions.INNER',
44
-       'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'a:3:{i:0;s:48:"div.summary *:not(del)>.woocommerce-Price-amount";i:1;s:54:"div.entry-summary *:not(del)>.woocommerce-Price-amount";i:2;s:36:"*:not(del)>.woocommerce-Price-amount";}',
45
-       'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'a:2:{i:0;s:22:"div.quantity input.qty";i:1;s:18:"div.quantity>input";}',
46
-       'PAGANTIS_FORM_DISPLAY_TYPE'=>0,
47
-       'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1,
48
-       'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0,
49
-       'PAGANTIS_URL_OK'=>'',
50
-       'PAGANTIS_URL_KO'=>'',
51
-       'PAGANTIS_ALLOWED_COUNTRIES' => 'a:3:{i:0;s:2:"es";i:1;s:2:"it";i:2;s:2:"fr";}',
52
-       'PAGANTIS_PROMOTION_EXTRA' => '<p>Finance this product <span class="pg-no-interest">without interest!</span></p>',
53
-       'PAGANTIS_SIMULATOR_THOUSANDS_SEPARATOR' => '.',
54
-       'PAGANTIS_SIMULATOR_DECIMAL_SEPARATOR' => ',',
55
-       'PAGANTIS_SIMULATOR_DISPLAY_SITUATION' => 'default',
56
-       'PAGANTIS_SIMULATOR_SELECTOR_VARIATION' => 'default'
36
+        'PAGANTIS_TITLE'=>'Pago en cuotas',
37
+        'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'sdk.simulator.types.SELECTABLE_TEXT_CUSTOM',
38
+        'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'sdk.simulator.skins.BLUE',
39
+        'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
40
+        'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3,
41
+        'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12,
42
+        'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
43
+        'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'sdk.simulator.positions.INNER',
44
+        'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'a:3:{i:0;s:48:"div.summary *:not(del)>.woocommerce-Price-amount";i:1;s:54:"div.entry-summary *:not(del)>.woocommerce-Price-amount";i:2;s:36:"*:not(del)>.woocommerce-Price-amount";}',
45
+        'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'a:2:{i:0;s:22:"div.quantity input.qty";i:1;s:18:"div.quantity>input";}',
46
+        'PAGANTIS_FORM_DISPLAY_TYPE'=>0,
47
+        'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1,
48
+        'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0,
49
+        'PAGANTIS_URL_OK'=>'',
50
+        'PAGANTIS_URL_KO'=>'',
51
+        'PAGANTIS_ALLOWED_COUNTRIES' => 'a:3:{i:0;s:2:"es";i:1;s:2:"it";i:2;s:2:"fr";}',
52
+        'PAGANTIS_PROMOTION_EXTRA' => '<p>Finance this product <span class="pg-no-interest">without interest!</span></p>',
53
+        'PAGANTIS_SIMULATOR_THOUSANDS_SEPARATOR' => '.',
54
+        'PAGANTIS_SIMULATOR_DECIMAL_SEPARATOR' => ',',
55
+        'PAGANTIS_SIMULATOR_DISPLAY_SITUATION' => 'default',
56
+        'PAGANTIS_SIMULATOR_SELECTOR_VARIATION' => 'default'
57 57
     );
58 58
 
59 59
     /** @var Array $extraConfig */
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
         if ($file == plugin_basename(__FILE__)) {
400 400
             $links[] = '<a href="'.WcPagantis::GIT_HUB_URL.'" target="_blank">'.__('Documentation', 'pagantis').'</a>';
401 401
             $links[] = '<a href="'.WcPagantis::PAGANTIS_DOC_URL.'" target="_blank">'.
402
-                       __('API documentation', 'pagantis').'</a>';
402
+                        __('API documentation', 'pagantis').'</a>';
403 403
             $links[] = '<a href="'.WcPagantis::SUPPORT_EML.'">'.__('Support', 'pagantis').'</a>';
404 404
 
405 405
             return $links;
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
         register_activation_hook(__FILE__, array($this, 'pagantisActivation'));
83 83
         add_action('woocommerce_product_options_general_product_data', array($this, 'pagantisPromotedProductTpl'));
84 84
         add_action('woocommerce_process_product_meta', array($this, 'pagantisPromotedVarSave'));
85
-        add_action('woocommerce_product_bulk_edit_start', array($this,'pagantisPromotedBulkTemplate'));
86
-        add_action('woocommerce_product_bulk_edit_save', array($this,'pagantisPromotedBulkTemplateSave'));
85
+        add_action('woocommerce_product_bulk_edit_start', array($this, 'pagantisPromotedBulkTemplate'));
86
+        add_action('woocommerce_product_bulk_edit_save', array($this, 'pagantisPromotedBulkTemplateSave'));
87 87
     }
88 88
 
89 89
     /**
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     {
110 110
         $post_id = $product->get_id();
111 111
         $pagantis_promoted_value = $_REQUEST['pagantis_promoted'];
112
-        if ($pagantis_promoted_value == 'on') {
112
+        if ($pagantis_promoted_value=='on') {
113 113
             $pagantis_promoted_value = 'yes';
114 114
         } else {
115 115
             $pagantis_promoted_value = 'no';
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     public function pagantisPromotedVarSave($post_id)
144 144
     {
145 145
         $pagantis_promoted_value = $_POST['pagantis_promoted'];
146
-        if ($pagantis_promoted_value == null) {
146
+        if ($pagantis_promoted_value==null) {
147 147
             $pagantis_promoted_value = 'no';
148 148
         }
149 149
         update_post_meta($post_id, 'custom_product_pagantis_promoted', esc_attr($pagantis_promoted_value));
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function loadPagantisTranslation($mofile, $domain)
158 158
     {
159
-        if ('pagantis' === $domain) {
160
-            $mofile = WP_LANG_DIR . '/../plugins/pagantis/languages/pagantis-' . get_locale() . '.mo';
159
+        if ('pagantis'===$domain) {
160
+            $mofile = WP_LANG_DIR.'/../plugins/pagantis/languages/pagantis-'.get_locale().'.mo';
161 161
         }
162 162
         return $mofile;
163 163
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         global $wpdb;
171 171
 
172 172
         $tableName = $wpdb->prefix.self::CONCURRENCY_TABLE;
173
-        if ($wpdb->get_var("SHOW TABLES LIKE '$tableName'") != $tableName) {
173
+        if ($wpdb->get_var("SHOW TABLES LIKE '$tableName'")!=$tableName) {
174 174
             $charset_collate = $wpdb->get_charset_collate();
175 175
             $sql = "CREATE TABLE $tableName ( order_id int NOT NULL,  
176 176
                     createdAt timestamp DEFAULT CURRENT_TIMESTAMP, UNIQUE KEY id (order_id)) $charset_collate";
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $tableName = $wpdb->prefix.self::CONFIG_TABLE;
182 182
 
183 183
         //Check if table exists
184
-        $tableExists = $wpdb->get_var("SHOW TABLES LIKE '$tableName'") != $tableName;
184
+        $tableExists = $wpdb->get_var("SHOW TABLES LIKE '$tableName'")!=$tableName;
185 185
         if ($tableExists) {
186 186
             $charset_collate = $wpdb->get_charset_collate();
187 187
             $sql = "CREATE TABLE IF NOT EXISTS $tableName (
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             //Updated value field to adapt to new length < v8.0.1
197 197
             $query = "select COLUMN_TYPE FROM information_schema.COLUMNS where TABLE_NAME='$tableName' AND COLUMN_NAME='value'";
198 198
             $results = $wpdb->get_results($query, ARRAY_A);
199
-            if ($results['0']['COLUMN_TYPE'] == 'varchar(100)') {
199
+            if ($results['0']['COLUMN_TYPE']=='varchar(100)') {
200 200
                 $sql = "ALTER TABLE $tableName MODIFY value varchar(1000)";
201 201
                 $wpdb->query($sql);
202 202
             }
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
                                or config='PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'";
207 207
             $dbCurrentConfig = $wpdb->get_results($query, ARRAY_A);
208 208
             foreach ($dbCurrentConfig as $item) {
209
-                if ($item['config'] == 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR') {
209
+                if ($item['config']=='PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR') {
210 210
                     $css_price_selector = $this->preparePriceSelector($item['value']);
211
-                    if ($item['value'] != $css_price_selector) {
211
+                    if ($item['value']!=$css_price_selector) {
212 212
                         $wpdb->update(
213 213
                             $tableName,
214 214
                             array('value' => stripslashes($css_price_selector)),
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
                             array('%s')
218 218
                         );
219 219
                     }
220
-                } elseif ($item['config'] == 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR') {
220
+                } elseif ($item['config']=='PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR') {
221 221
                     $css_quantity_selector = $this->prepareQuantitySelector($item['value']);
222
-                    if ($item['value'] != $css_quantity_selector) {
222
+                    if ($item['value']!=$css_quantity_selector) {
223 223
                         $wpdb->update(
224 224
                             $tableName,
225 225
                             array('value' => stripslashes($css_quantity_selector)),
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $tableName = $wpdb->prefix.self::CONFIG_TABLE;
237 237
         $query = "select * from $tableName where config='PAGANTIS_SIMULATOR_THOUSANDS_SEPARATOR'";
238 238
         $results = $wpdb->get_results($query, ARRAY_A);
239
-        if (count($results) == 0) {
239
+        if (count($results)==0) {
240 240
             $wpdb->insert($tableName, array('config' => 'PAGANTIS_SIMULATOR_THOUSANDS_SEPARATOR', 'value'  => '.'), array('%s', '%s'));
241 241
             $wpdb->insert($tableName, array('config' => 'PAGANTIS_SIMULATOR_DECIMAL_SEPARATOR', 'value'  => ','), array('%s', '%s'));
242 242
         }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         $tableName = $wpdb->prefix.self::CONFIG_TABLE;
246 246
         $query = "select * from $tableName where config='PAGANTIS_DISPLAY_MAX_AMOUNT'";
247 247
         $results = $wpdb->get_results($query, ARRAY_A);
248
-        if (count($results) == 0) {
248
+        if (count($results)==0) {
249 249
             $wpdb->insert($tableName, array('config' => 'PAGANTIS_DISPLAY_MAX_AMOUNT', 'value'  => '0'), array('%s', '%s'));
250 250
         }
251 251
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         $tableName = $wpdb->prefix.self::CONFIG_TABLE;
254 254
         $query = "select * from $tableName where config='PAGANTIS_SIMULATOR_DISPLAY_SITUATION'";
255 255
         $results = $wpdb->get_results($query, ARRAY_A);
256
-        if (count($results) == 0) {
256
+        if (count($results)==0) {
257 257
             $wpdb->insert($tableName, array('config' => 'PAGANTIS_SIMULATOR_DISPLAY_SITUATION', 'value'  => 'default'), array('%s', '%s'));
258 258
             $wpdb->insert($tableName, array('config' => 'PAGANTIS_SIMULATOR_SELECTOR_VARIATION', 'value'  => 'default'), array('%s', '%s'));
259 259
         }
@@ -302,9 +302,9 @@  discard block
 block discarded – undo
302 302
         $minAmount = $this->extraConfig['PAGANTIS_DISPLAY_MIN_AMOUNT'];
303 303
         $maxAmount = $this->extraConfig['PAGANTIS_DISPLAY_MAX_AMOUNT'];
304 304
         $totalPrice = $product->get_price();
305
-        $validAmount = ($totalPrice>=$minAmount && ($totalPrice<=$maxAmount || $maxAmount=='0'));
306
-        if ($cfg['enabled'] !== 'yes' || $cfg['pagantis_public_key'] == '' || $cfg['pagantis_private_key'] == '' ||
307
-            $cfg['simulator'] !== 'yes'  || !$allowedCountry || !$validAmount) {
305
+        $validAmount = ($totalPrice >= $minAmount && ($totalPrice <= $maxAmount || $maxAmount=='0'));
306
+        if ($cfg['enabled']!=='yes' || $cfg['pagantis_public_key']=='' || $cfg['pagantis_private_key']=='' ||
307
+            $cfg['simulator']!=='yes' || !$allowedCountry || !$validAmount) {
308 308
             return;
309 309
         }
310 310
 
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function addPagantisGateway($methods)
344 344
     {
345
-        if (! class_exists('WC_Payment_Gateway')) {
345
+        if (!class_exists('WC_Payment_Gateway')) {
346 346
             return $methods;
347 347
         }
348 348
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
      */
398 398
     public function pagantisRowMeta($links, $file)
399 399
     {
400
-        if ($file == plugin_basename(__FILE__)) {
400
+        if ($file==plugin_basename(__FILE__)) {
401 401
             $links[] = '<a href="'.WcPagantis::GIT_HUB_URL.'" target="_blank">'.__('Documentation', 'pagantis').'</a>';
402 402
             $links[] = '<a href="'.WcPagantis::PAGANTIS_DOC_URL.'" target="_blank">'.
403 403
                        __('API documentation', 'pagantis').'</a>';
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
         $tableName = $wpdb->prefix.self::LOGS_TABLE;
426 426
         $query = "select * from $tableName where createdAt>$from and createdAt<$to order by createdAt desc";
427 427
         $results = $wpdb->get_results($query);
428
-        if (isset($results) && $privateKey == $secretKey) {
428
+        if (isset($results) && $privateKey==$secretKey) {
429 429
             foreach ($results as $key => $result) {
430 430
                 $response[$key]['timestamp'] = $result->createdAt;
431 431
                 $response[$key]['log']       = json_decode($result->log);
@@ -452,12 +452,12 @@  discard block
 block discarded – undo
452 452
 
453 453
         $filters   = ($data->get_params());
454 454
         $secretKey = $filters['secret'];
455
-        $cfg  = get_option('woocommerce_pagantis_settings');
455
+        $cfg = get_option('woocommerce_pagantis_settings');
456 456
         $privateKey = isset($cfg['pagantis_private_key']) ? $cfg['pagantis_private_key'] : null;
457
-        if ($privateKey != $secretKey) {
457
+        if ($privateKey!=$secretKey) {
458 458
             $response['status'] = 401;
459 459
             $response['result'] = 'Unauthorized';
460
-        } elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {
460
+        } elseif ($_SERVER['REQUEST_METHOD']=='POST') {
461 461
             if (count($_POST)) {
462 462
                 foreach ($_POST as $config => $value) {
463 463
                     if (isset($this->defaultConfigs[$config]) && $response['status']==null) {
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
                   and tn.post_date<'".$to->format("Y-m-d")."' order by tn.post_date desc";
518 518
         $results = $wpdb->get_results($query);
519 519
 
520
-        if (isset($results) && $privateKey == $secretKey) {
520
+        if (isset($results) && $privateKey==$secretKey) {
521 521
             foreach ($results as $result) {
522 522
                 $key = $result->ID;
523 523
                 $response['message'][$key]['timestamp'] = $result->post_date;
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
      */
602 602
     private function prepareQuantitySelector($css_quantity_selector)
603 603
     {
604
-        if ($css_quantity_selector == 'default' || $css_quantity_selector == '') {
604
+        if ($css_quantity_selector=='default' || $css_quantity_selector=='') {
605 605
             $css_quantity_selector = $this->defaultConfigs['PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'];
606 606
         } elseif (!unserialize($css_quantity_selector)) { //in the case of a custom string selector, we keep it
607 607
             $css_quantity_selector = serialize(array($css_quantity_selector));
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
      */
618 618
     private function preparePriceSelector($css_price_selector)
619 619
     {
620
-        if ($css_price_selector == 'default' || $css_price_selector == '') {
620
+        if ($css_price_selector=='default' || $css_price_selector=='') {
621 621
             $css_price_selector = $this->defaultConfigs['PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'];
622 622
         } elseif (!unserialize($css_price_selector)) { //in the case of a custom string selector, we keep it
623 623
             $css_price_selector = serialize(array($css_price_selector));
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
     {
636 636
         $metaProduct = get_post_meta($product_id);
637 637
         return (array_key_exists('custom_product_pagantis_promoted', $metaProduct) &&
638
-                $metaProduct['custom_product_pagantis_promoted']['0'] === 'yes') ? 'true' : 'false';
638
+                $metaProduct['custom_product_pagantis_promoted']['0']==='yes') ? 'true' : 'false';
639 639
     }
640 640
 }
641 641
 
Please login to merge, or discard this patch.