@@ -14,14 +14,14 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Abort if this file is called directly |
| 16 | 16 | */ |
| 17 | -if (!defined('ABSPATH')) { |
|
| 17 | +if ( ! defined('ABSPATH')) { |
|
| 18 | 18 | exit; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * Include plugin file if function is_plugin_active does not exist |
| 23 | 23 | */ |
| 24 | -if (!function_exists('is_plugin_active')) { |
|
| 24 | +if ( ! function_exists('is_plugin_active')) { |
|
| 25 | 25 | require_once(ABSPATH . '/wp-admin/includes/plugin.php'); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | define('ALGOLIA_APPLICATION_ID', '_application_id'); |
| 45 | 45 | define('ALGOLIA_API_KEY', '_admin_api_key'); |
| 46 | 46 | |
| 47 | -if (!class_exists('Algolia_Send_Products')) { |
|
| 47 | +if ( ! class_exists('Algolia_Send_Products')) { |
|
| 48 | 48 | /** |
| 49 | 49 | * Algolia WooIndexer main class |
| 50 | 50 | */ |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } catch (\Algolia\AlgoliaSearch\Exceptions\UnreachableException $error) { |
| 71 | 71 | add_action( |
| 72 | 72 | 'admin_notices', |
| 73 | - function () { |
|
| 73 | + function() { |
|
| 74 | 74 | echo '<div class="error notice"> |
| 75 | 75 | <p>' . esc_html__('An error has been encountered. Please check your application ID and API key. ', 'algolia-woo-indexer') . '</p> |
| 76 | 76 | </div>'; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $algolia_api_key = is_string($algolia_api_key) ? $algolia_api_key : CHANGE_ME; |
| 107 | 107 | |
| 108 | 108 | $algolia_index_name = get_option(ALGOWOO_DB_OPTION . INDEX_NAME); |
| 109 | - $algolia_index_name = is_string($algolia_index_name) ? $algolia_index_name : CHANGE_ME; |
|
| 109 | + $algolia_index_name = is_string($algolia_index_name) ? $algolia_index_name : CHANGE_ME; |
|
| 110 | 110 | |
| 111 | 111 | /** |
| 112 | 112 | * Display admin notice and return if not all values have been set |
@@ -171,11 +171,11 @@ discard block |
||
| 171 | 171 | * Set sale price or regular price based on product type |
| 172 | 172 | */ |
| 173 | 173 | if ($product->is_type('simple')) { |
| 174 | - $sale_price = $product->get_sale_price(); |
|
| 175 | - $regular_price = $product->get_regular_price(); |
|
| 174 | + $sale_price = $product->get_sale_price(); |
|
| 175 | + $regular_price = $product->get_regular_price(); |
|
| 176 | 176 | } elseif ($product->is_type('variable')) { |
| 177 | - $sale_price = $product->get_variation_sale_price('min', true); |
|
| 178 | - $regular_price = $product->get_variation_regular_price('max', true); |
|
| 177 | + $sale_price = $product->get_variation_sale_price('min', true); |
|
| 178 | + $regular_price = $product->get_variation_regular_price('max', true); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | /** |