From 4a505060e72321aad4181d17d449e6796de6c6de Mon Sep 17 00:00:00 2001 From: Dennis Nissle Date: Fri, 31 Mar 2017 15:51:21 +0200 Subject: [PATCH] else if -> elseif --- .../abstracts/abstract-wc-gzd-compatibility.php | 4 ++-- includes/abstracts/abstract-wc-gzd-product.php | 6 +++--- includes/admin/class-wc-gzd-admin-notices.php | 4 ++-- includes/admin/class-wc-gzd-admin.php | 2 +- .../class-wc-gzd-settings-germanized.php | 2 +- .../admin/views/html-page-status-germanized.php | 2 +- .../class-wc-gzd-rest-products-controller.php | 2 +- includes/class-wc-gzd-customer-helper.php | 4 ++-- includes/class-wc-gzd-dependencies.php | 8 ++++---- includes/class-wc-gzd-emails.php | 2 +- .../class-wc-gzd-compatibility-wpml.php | 4 ++-- .../class-wc-gzd-gateway-direct-debit.php | 2 +- .../class-wc-gzd-trusted-shops-admin.php | 2 +- .../class-wc-gzd-trusted-shops-schedule.php | 2 +- includes/wc-gzd-cart-functions.php | 16 ++++++++-------- includes/wc-gzd-legacy-functions.php | 4 ++-- includes/wc-gzd-product-functions.php | 6 +++--- includes/wc-gzd-template-functions.php | 2 +- 18 files changed, 37 insertions(+), 37 deletions(-) diff --git a/includes/abstracts/abstract-wc-gzd-compatibility.php b/includes/abstracts/abstract-wc-gzd-compatibility.php index 67e7b7483..c1d05391c 100644 --- a/includes/abstracts/abstract-wc-gzd-compatibility.php +++ b/includes/abstracts/abstract-wc-gzd-compatibility.php @@ -27,11 +27,11 @@ public function __construct( $plugin_name, $plugin_file, $version_data = array() if ( empty( $version_data[ 'requires_at_least' ] ) && empty( $version_data[ 'tested_up_to' ] ) ) { $version_data[ 'requires_at_least' ] = $version_data[ 'version' ]; $version_data[ 'tested_up_to' ] = $version_data[ 'version' ]; - } else if ( empty( $version_data[ 'tested_up_to' ] ) ) { + } elseif ( empty( $version_data[ 'tested_up_to' ] ) ) { $version_data[ 'tested_up_to' ] = $version_data[ 'requires_at_least' ]; if ( wc_gzd_get_dependencies()->compare_versions( $version_data[ 'version' ], $version_data[ 'requires_at_least' ], '>' ) ) $version_data[ 'tested_up_to' ] = $version_data[ 'version' ]; - } else if ( empty( $version_data[ 'requires_at_least' ] ) ) { + } elseif ( empty( $version_data[ 'requires_at_least' ] ) ) { $version_data[ 'requires_at_least' ] = $version_data[ 'tested_up_to' ]; if ( wc_gzd_get_dependencies()->compare_versions( $version_data[ 'version' ], $version_data[ 'requires_at_least' ], '<' ) ) $version_data[ 'requires_at_least' ] = $version_data[ 'version' ]; diff --git a/includes/abstracts/abstract-wc-gzd-product.php b/includes/abstracts/abstract-wc-gzd-product.php index 481216b65..5d1ce233b 100644 --- a/includes/abstracts/abstract-wc-gzd-product.php +++ b/includes/abstracts/abstract-wc-gzd-product.php @@ -71,7 +71,7 @@ public function __get( $key ) { if ( '' === $value ) $value = $this->gzd_variation_level_meta[ $key ]; - } else if ( $this->child->is_type( 'variation' ) && in_array( $key, $this->gzd_variation_inherited_meta_data ) ) { + } elseif ( $this->child->is_type( 'variation' ) && in_array( $key, $this->gzd_variation_inherited_meta_data ) ) { $value = wc_gzd_get_crud_data( $this->child, $key ) ? wc_gzd_get_crud_data( $this->child, $key ) : ''; @@ -80,7 +80,7 @@ public function __get( $key ) { $value = wc_gzd_get_crud_data( wc_get_product( wc_gzd_get_crud_data( $this->child, 'parent' ) ), $key ); } - } else if ( $key == 'delivery_time' ) { + } elseif ( $key == 'delivery_time' ) { $value = $this->get_delivery_time(); @@ -104,7 +104,7 @@ public function __get( $key ) { public function __isset( $key ) { if ( $this->child->is_type( 'variation' ) && in_array( $key, array_keys( $this->gzd_variation_level_meta ) ) ) { return metadata_exists( 'post', wc_gzd_get_crud_data( $this->child, 'id' ), '_' . $key ); - } else if ( $this->child->is_type( 'variation' ) && in_array( $key, array_keys( $this->gzd_variation_inherited_meta_data ) ) ) { + } elseif ( $this->child->is_type( 'variation' ) && in_array( $key, array_keys( $this->gzd_variation_inherited_meta_data ) ) ) { return metadata_exists( 'post', wc_gzd_get_crud_data( $this->child, 'id' ), '_' . $key ) || metadata_exists( 'post', wc_gzd_get_crud_data( $this->child, 'parent' ), '_' . $key ); } else { return metadata_exists( 'post', wc_gzd_get_crud_data( $this->child, 'id' ), '_' . $key ); diff --git a/includes/admin/class-wc-gzd-admin-notices.php b/includes/admin/class-wc-gzd-admin-notices.php index d08020191..d8f270de7 100644 --- a/includes/admin/class-wc-gzd-admin-notices.php +++ b/includes/admin/class-wc-gzd-admin-notices.php @@ -63,9 +63,9 @@ public function add_notices() { if ( ! $this->is_theme_compatible() ) add_action( 'admin_notices', array( $this, 'theme_incompatibility_notice' ) ); - else if ( $this->is_theme_supported_by_pro() ) + elseif ( $this->is_theme_supported_by_pro() ) add_action( 'admin_notices', array( $this, 'theme_supported_notice' ) ); - else if ( ! $this->is_theme_ready() ) + elseif ( ! $this->is_theme_ready() ) add_action( 'admin_notices', array( $this, 'theme_not_ready_notice' ) ); } diff --git a/includes/admin/class-wc-gzd-admin.php b/includes/admin/class-wc-gzd-admin.php index e72376be5..746e86670 100644 --- a/includes/admin/class-wc-gzd-admin.php +++ b/includes/admin/class-wc-gzd-admin.php @@ -205,7 +205,7 @@ public function check_tour_hide() { wp_safe_redirect( remove_query_arg( array( 'hide', 'tour', '_wpnonce' ) ) ); - } else if ( isset( $_GET[ 'tour' ] ) && isset( $_GET[ 'enable' ] ) && isset( $_GET[ '_wpnonce' ] ) && check_admin_referer( 'wc-gzd-tour-enable' ) ) { + } elseif ( isset( $_GET[ 'tour' ] ) && isset( $_GET[ 'enable' ] ) && isset( $_GET[ '_wpnonce' ] ) && check_admin_referer( 'wc-gzd-tour-enable' ) ) { $setting_sections = array_merge( array( 'general' => '', diff --git a/includes/admin/settings/class-wc-gzd-settings-germanized.php b/includes/admin/settings/class-wc-gzd-settings-germanized.php index 4164a0007..189eb173d 100644 --- a/includes/admin/settings/class-wc-gzd-settings-germanized.php +++ b/includes/admin/settings/class-wc-gzd-settings-germanized.php @@ -1258,7 +1258,7 @@ public function before_save( $settings ) { update_option( 'woocommerce_calc_taxes', 'yes' ); update_option( 'woocommerce_prices_include_tax', 'yes' ); } - } else if ( $setting[ 'id' ] == 'woocommerce_gzd_enable_virtual_vat' ) { + } elseif ( $setting[ 'id' ] == 'woocommerce_gzd_enable_virtual_vat' ) { if ( get_option( 'woocommerce_gzd_enable_virtual_vat' ) != 'yes' && ! empty( $_POST[ 'woocommerce_gzd_enable_virtual_vat' ] ) ) { if ( ! empty( $_POST[ 'woocommerce_gzd_small_enterprise' ] ) ) continue; diff --git a/includes/admin/views/html-page-status-germanized.php b/includes/admin/views/html-page-status-germanized.php index 01ebe8999..456ad803d 100644 --- a/includes/admin/views/html-page-status-germanized.php +++ b/includes/admin/views/html-page-status-germanized.php @@ -107,7 +107,7 @@ foreach ( $rates as $rate ) { if ( ! isset( $tax_rate_names[ $rate->tax_rate_name ] ) ) $tax_rate_names[ $rate->tax_rate_name ] = $rate; - else if ( $tax_rate_names[ $rate->tax_rate_name ]->tax_rate_class != $rate->tax_rate_class ) + elseif ( $tax_rate_names[ $rate->tax_rate_name ]->tax_rate_class != $rate->tax_rate_class ) array_push( $collisions, array( $tax_rate_names[ $rate->tax_rate_name ], $rate ) ); } diff --git a/includes/api/class-wc-gzd-rest-products-controller.php b/includes/api/class-wc-gzd-rest-products-controller.php index 6b0336f70..8ab9915c2 100644 --- a/includes/api/class-wc-gzd-rest-products-controller.php +++ b/includes/api/class-wc-gzd-rest-products-controller.php @@ -387,7 +387,7 @@ public function save_update_product_data( $request, $product ) { if ( isset( $data[ '_unit_price_auto' ] ) && ! empty( $data[ '_unit_price_auto' ] ) ) $data[ '_unit_price_auto' ] = true; - else if ( empty( $data[ '_unit_price_auto' ] ) ) + elseif ( empty( $data[ '_unit_price_auto' ] ) ) unset( $data[ '_unit_price_auto' ] ); else $data[ '_unit_price_auto' ] = get_post_meta( $real_product_id, '_unit_price_auto', true ); diff --git a/includes/class-wc-gzd-customer-helper.php b/includes/class-wc-gzd-customer-helper.php index c832d4844..17d071f4f 100644 --- a/includes/class-wc-gzd-customer-helper.php +++ b/includes/class-wc-gzd-customer-helper.php @@ -136,7 +136,7 @@ public function disable_checkout() { // Disable registration WC()->session->set( 'disable_checkout_signup', true ); - } else if ( ! WC()->session->get( 'disable_checkout_signup' ) ) { + } elseif ( ! WC()->session->get( 'disable_checkout_signup' ) ) { if ( is_checkout() && ( ! is_user_logged_in() || ! wc_gzd_is_customer_activated() ) ) { @@ -144,7 +144,7 @@ public function disable_checkout() { wp_safe_redirect( wc_gzd_get_page_permalink( 'myaccount' ) ); exit; - } else if ( is_checkout() ) { + } elseif ( is_checkout() ) { unset( WC()->session->login_redirect ); diff --git a/includes/class-wc-gzd-dependencies.php b/includes/class-wc-gzd-dependencies.php index 0e8b3fece..a00688d92 100644 --- a/includes/class-wc-gzd-dependencies.php +++ b/includes/class-wc-gzd-dependencies.php @@ -94,9 +94,9 @@ public function __construct( $plugin = null ) { if ( ! $this->is_plugin_activated( $plugin ) ) { $this->plugins_result[ 'unactivated' ][ $plugin ] = $data; - } else if ( $this->is_plugin_outdated( $plugin ) ) { + } elseif ( $this->is_plugin_outdated( $plugin ) ) { $this->plugins_result[ 'outdated' ][ $plugin ] = $data; - } else if ( ! $this->is_plugin_tested( $plugin ) ) { + } elseif ( ! $this->is_plugin_tested( $plugin ) ) { $this->plugins_result[ 'untested' ][ $plugin ] = $data; } @@ -106,7 +106,7 @@ public function __construct( $plugin = null ) { $this->loadable = false; remove_all_actions( 'admin_notices' ); add_action( 'admin_notices', array( $this, 'dependencies_notice' ) ); - } else if ( ! empty( $this->plugins_result[ 'untested' ] ) ) { + } elseif ( ! empty( $this->plugins_result[ 'untested' ] ) ) { remove_all_actions( 'admin_notices' ); add_action( 'admin_notices', array( $this, 'dependencies_notice' ) ); } @@ -150,7 +150,7 @@ protected function parse_plugin_header_data() { foreach ( $plugin_data as $key => $value ) { if ( strpos( $key, 'requires' ) !== false ) { $this->plugins_header[ str_replace( 'requires_', '', $key ) ][ 'requires' ] = $value; - } else if ( strpos( $key, 'tested' ) !== false ) { + } elseif ( strpos( $key, 'tested' ) !== false ) { $this->plugins_header[ str_replace( 'tested_', '', $key ) ][ 'tested' ] = $value; } } diff --git a/includes/class-wc-gzd-emails.php b/includes/class-wc-gzd-emails.php index 7d6642743..eefbd3606 100644 --- a/includes/class-wc-gzd-emails.php +++ b/includes/class-wc-gzd-emails.php @@ -72,7 +72,7 @@ public function maybe_hide_username_password_reset( $translated, $original, $dom if ( 'woocommerce' === $domain ) { if ( 'Someone requested that the password be reset for the following account:' === $original ) { return __( 'Someone requested a password reset for your account.', 'woocommerce-germanized' ); - } else if ( 'Username: %s' === $original ) { + } elseif ( 'Username: %s' === $original ) { remove_filter( 'gettext', array( $this, 'maybe_hide_username_password_reset' ), 10, 3 ); return ''; } diff --git a/includes/compatibility/class-wc-gzd-compatibility-wpml.php b/includes/compatibility/class-wc-gzd-compatibility-wpml.php index 9e9f21020..b79f6434e 100644 --- a/includes/compatibility/class-wc-gzd-compatibility-wpml.php +++ b/includes/compatibility/class-wc-gzd-compatibility-wpml.php @@ -63,7 +63,7 @@ public function send_order_admin_confirmation( $order_id ) { if ( method_exists( $woocommerce_wpml->emails, 'admin_email' ) ) $woocommerce_wpml->emails->admin_email( $order_id ); - else if ( method_exists( $woocommerce_wpml->emails, 'new_order_admin_email' ) ) + elseif ( method_exists( $woocommerce_wpml->emails, 'new_order_admin_email' ) ) $woocommerce_wpml->emails->new_order_admin_email( $order_id ); // Stop Germanized from sending the notification @@ -89,7 +89,7 @@ public function unregister_order_confirmation_hooks() { foreach ( $statuses as $status ) { if ( method_exists( $woocommerce_wpml->emails, 'admin_email' ) ) remove_action( $status, array( $woocommerce_wpml->emails, 'admin_email' ), 9 ); - else if ( method_exists( $woocommerce_wpml->emails, 'new_order_admin_email' ) ) + elseif ( method_exists( $woocommerce_wpml->emails, 'new_order_admin_email' ) ) remove_action( $status, array( $woocommerce_wpml->emails, 'new_order_admin_email' ), 9 ); } } diff --git a/includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php b/includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php index c15fa8de2..e09aa751f 100644 --- a/includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php +++ b/includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php @@ -150,7 +150,7 @@ public function export_args( $args = array() ) { if ( isset( $_GET['sepa_start_date'] ) || isset( $_GET['sepa_end_date'] ) ) { $args['start_date'] = ( isset( $_GET['sepa_start_date'] ) ? sanitize_text_field( $_GET['sepa_start_date'] ) : '' ); $args['end_date'] = ( isset( $_GET['sepa_end_date'] ) ? sanitize_text_field( $_GET['sepa_end_date'] ) : '' ); - } else if ( isset( $_GET[ 'sepa_order_id' ] ) ) { + } elseif ( isset( $_GET[ 'sepa_order_id' ] ) ) { $args['order_id'] = absint( $_GET['sepa_order_id'] ); } } diff --git a/includes/trusted-shops/class-wc-gzd-trusted-shops-admin.php b/includes/trusted-shops/class-wc-gzd-trusted-shops-admin.php index 581fb7b99..ca7b6f200 100644 --- a/includes/trusted-shops/class-wc-gzd-trusted-shops-admin.php +++ b/includes/trusted-shops/class-wc-gzd-trusted-shops-admin.php @@ -447,7 +447,7 @@ public function before_save( $settings ) { if ( $setting[ 'id' ] == 'woocommerce_' . $this->base->option_prefix . 'trusted_shops_review_widget_enable' ) { if ( ! empty( $_POST[ 'woocommerce_' . $this->base->option_prefix . 'trusted_shops_review_widget_enable' ] ) && ! $this->base->is_review_widget_enabled() ) update_option( '_woocommerce_' . $this->base->option_prefix . 'trusted_shops_update_reviews', 1 ); - } else if ( $setting[ 'id' ] == 'woocommerce_' . $this->base->option_prefix . 'trusted_shops_rich_snippets_enable' ) { + } elseif ( $setting[ 'id' ] == 'woocommerce_' . $this->base->option_prefix . 'trusted_shops_rich_snippets_enable' ) { if ( ! empty( $_POST[ 'woocommerce_' . $this->base->option_prefix . 'trusted_shops_rich_snippets_enable' ] ) && ! $this->base->is_rich_snippets_enabled() ) update_option( '_woocommerce_' . $this->base->option_prefix . 'trusted_shops_update_snippets', 1 ); } diff --git a/includes/trusted-shops/class-wc-gzd-trusted-shops-schedule.php b/includes/trusted-shops/class-wc-gzd-trusted-shops-schedule.php index a6a081f44..e51ecbff9 100644 --- a/includes/trusted-shops/class-wc-gzd-trusted-shops-schedule.php +++ b/includes/trusted-shops/class-wc-gzd-trusted-shops-schedule.php @@ -176,7 +176,7 @@ private function get_file_content( $url ) { return $output; - } else if ( ini_get( 'allow_url_fopen' ) ) { + } elseif ( ini_get( 'allow_url_fopen' ) ) { return file_get_contents( $url ); } diff --git a/includes/wc-gzd-cart-functions.php b/includes/wc-gzd-cart-functions.php index f8ca6a0a7..88dc38ff3 100644 --- a/includes/wc-gzd-cart-functions.php +++ b/includes/wc-gzd-cart-functions.php @@ -40,11 +40,11 @@ function wc_gzd_cart_product_item_desc( $title, $cart_item, $cart_item_key = '' if ( wc_gzd_get_gzd_product( $product )->get_mini_desc() ) $product_desc = wc_gzd_get_gzd_product( $product )->get_mini_desc(); - } else if ( isset( $cart_item[ 'item_desc' ] ) ) { + } elseif ( isset( $cart_item[ 'item_desc' ] ) ) { $product_desc = $cart_item[ 'item_desc' ]; - } else if ( isset( $cart_item[ 'product_id' ] ) ) { + } elseif ( isset( $cart_item[ 'product_id' ] ) ) { $product = wc_get_product( ! empty( $cart_item[ 'variation_id' ] ) ? $cart_item[ 'variation_id' ] : $cart_item[ 'product_id' ] ); @@ -77,11 +77,11 @@ function wc_gzd_cart_product_delivery_time( $title, $cart_item, $cart_item_key = if ( wc_gzd_get_gzd_product( $product )->get_delivery_time_term() ) $delivery_time = wc_gzd_get_gzd_product( $product )->get_delivery_time_html(); - } else if ( isset( $cart_item[ 'delivery_time' ] ) ) { + } elseif ( isset( $cart_item[ 'delivery_time' ] ) ) { $delivery_time = $cart_item[ 'delivery_time' ]; - } else if ( isset( $cart_item[ 'product_id' ] ) ) { + } elseif ( isset( $cart_item[ 'product_id' ] ) ) { $product = wc_get_product( ! empty( $cart_item[ 'variation_id' ] ) ? $cart_item[ 'variation_id' ] : $cart_item[ 'product_id' ] ); @@ -114,12 +114,12 @@ function wc_gzd_cart_product_unit_price( $price, $cart_item, $cart_item_key = '' if ( wc_gzd_get_gzd_product( $product )->has_unit() ) $unit_price = wc_gzd_get_gzd_product( $product )->get_unit_html( false ); - } else if ( isset( $cart_item[ 'unit_price' ] ) ) { + } elseif ( isset( $cart_item[ 'unit_price' ] ) ) { $unit_price = $cart_item[ 'unit_price' ]; - } else if ( isset( $cart_item[ 'product_id' ] ) ) { + } elseif ( isset( $cart_item[ 'product_id' ] ) ) { $product = wc_get_product( ! empty( $cart_item[ 'variation_id' ] ) ? $cart_item[ 'variation_id' ] : $cart_item[ 'product_id' ] ); @@ -152,11 +152,11 @@ function wc_gzd_cart_product_units( $title, $cart_item, $cart_item_key = '' ) { if ( wc_gzd_get_gzd_product( $product )->has_product_units() ) $units = wc_gzd_get_gzd_product( $product )->get_product_units_html(); - } else if ( isset( $cart_item[ 'units' ] ) ) { + } elseif ( isset( $cart_item[ 'units' ] ) ) { $units = $cart_item[ 'units' ]; - } else if ( isset( $cart_item[ 'product_id' ] ) ) { + } elseif ( isset( $cart_item[ 'product_id' ] ) ) { $product = wc_get_product( ! empty( $cart_item[ 'variation_id' ] ) ? $cart_item[ 'variation_id' ] : $cart_item[ 'product_id' ] ); diff --git a/includes/wc-gzd-legacy-functions.php b/includes/wc-gzd-legacy-functions.php index 2e0d3f843..cc58241b7 100644 --- a/includes/wc-gzd-legacy-functions.php +++ b/includes/wc-gzd-legacy-functions.php @@ -23,7 +23,7 @@ function wc_gzd_get_crud_data( $object, $key ) { if ( 'id' === $key && is_callable( array( $object, 'is_type' ) ) && $object->is_type( 'variation' ) && ! wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) { $key = 'variation_id'; - } else if ( 'parent' === $key && is_callable( array( $object, 'is_type' ) ) && $object->is_type( 'variation' ) && ! wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) { + } elseif ( 'parent' === $key && is_callable( array( $object, 'is_type' ) ) && $object->is_type( 'variation' ) && ! wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) { // Set getter to parent so that it is not being used for pre 2.7 $key = 'id'; $getter = 'parent'; @@ -46,7 +46,7 @@ function wc_gzd_get_crud_data( $object, $key ) { if ( $reflection->isPublic() ) { $value = $object->{$getter}(); } - } else if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) { + } elseif ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) { if ( substr( $key, 0, 1 ) !== '_' ) $key = '_' . $key; diff --git a/includes/wc-gzd-product-functions.php b/includes/wc-gzd-product-functions.php index 56d5efa23..48150660a 100644 --- a/includes/wc-gzd-product-functions.php +++ b/includes/wc-gzd-product-functions.php @@ -65,7 +65,7 @@ function wc_gzd_is_revocation_exempt( $product, $type = 'digital' ) { if ( empty( $types ) ) return false; - else if ( ! is_array( $types ) ) + elseif ( ! is_array( $types ) ) $types = array( $types ); if ( $type === 'digital' ) { @@ -74,7 +74,7 @@ function wc_gzd_is_revocation_exempt( $product, $type = 'digital' ) { if ( wc_gzd_product_matches_extended_type( $revo_type, $product ) ) return true; } - } else if ( $type === 'service' ) { + } elseif ( $type === 'service' ) { if ( wc_gzd_get_gzd_product( $product )->is_service() ) return true; } @@ -98,7 +98,7 @@ function wc_gzd_product_matches_extended_type( $type, $product ) { if ( $type === $product->get_type() ) $matches_type = true; - else if ( is_callable( array( $product, 'is_' . $type ) ) ) + elseif ( is_callable( array( $product, 'is_' . $type ) ) ) $matches_type = ( call_user_func_array( array( $product, 'is_' . $type ), array() ) === true ? true : false ); // Do only check parent if product does not match the type diff --git a/includes/wc-gzd-template-functions.php b/includes/wc-gzd-template-functions.php index 202129cab..f920d5e7a 100644 --- a/includes/wc-gzd-template-functions.php +++ b/includes/wc-gzd-template-functions.php @@ -567,7 +567,7 @@ function woocommerce_gzd_template_sale_price_label_html( $price, $product ) { if ( ! is_product() && get_option( 'woocommerce_gzd_display_listings_sale_price_labels' ) === 'no' ) return $price; - else if ( is_product() && get_option( 'woocommerce_gzd_display_product_detail_sale_price_labels' ) === 'no' ) + elseif ( is_product() && get_option( 'woocommerce_gzd_display_product_detail_sale_price_labels' ) === 'no' ) return $price; return wc_gzd_get_gzd_product( $product )->add_labels_to_price_html( $price );