/** * Misc funcitons */ /** * Get min/max price for WooCommerce products */ function jet_smart_filters_woo_prices( $args = array() ) { global $wpdb; if ( ! function_exists( 'wc' ) ) { return false; } $wc_query = wc()->query->get_main_query(); $tax_query = array(); if ( $wc_query ) { $wc_queried_object = $wc_query->queried_object; if ( ! empty( $wc_queried_object->taxonomy ) && ! empty( $wc_queried_object->term_id ) ) { $tax_query[] = array( 'taxonomy' => $wc_queried_object->taxonomy, 'terms' => array( $wc_queried_object->term_id ), 'field' => 'term_id', ); } } $tax_query = new WP_Tax_Query( $tax_query ); $tax_query_sql = $tax_query->get_sql( $wpdb->posts, 'ID' ); $sql = "SELECT min( FLOOR( price_meta.meta_value ) ) as min, max( CEILING( price_meta.meta_value ) ) as max FROM {$wpdb->posts} "; $sql .= " LEFT JOIN {$wpdb->postmeta} as price_meta ON {$wpdb->posts}.ID = price_meta.post_id " . $tax_query_sql['join']; $sql .= " WHERE {$wpdb->posts}.post_type IN ('" . implode( "','", array_map( 'esc_sql', apply_filters( 'woocommerce_price_filter_post_type', array( 'product' ) ) ) ) . "') AND {$wpdb->posts}.post_status = 'publish' AND price_meta.meta_key IN ('" . implode( "','", array_map( 'esc_sql', apply_filters( 'woocommerce_price_filter_meta_keys', array( '_price' ) ) ) ) . "') AND price_meta.meta_value > '' "; $sql .= $tax_query_sql['where']; if ( $wc_query ) { $search = WC_Query::get_main_search_query_sql(); } else { $search = false; } if ( $search ) { $sql .= ' AND ' . $search; } $price = $wpdb->get_row( $sql, ARRAY_A ); if ( class_exists( 'woocommerce_wpml' ) ){ $price['min'] = apply_filters( 'wcml_raw_price_amount', floatval( $price['min'] ) ); $price['max'] = apply_filters( 'wcml_raw_price_amount', floatval( $price['max'] ) ); } return $price; // WPCS: unprepared SQL ok. } /** * Callback to get min/max value for meta key */ function jet_smart_filters_meta_values( $args = array() ) { $key = ! empty( $args['key'] ) ? $args['key'] : false; if ( ! $key ) { return array(); } global $wpdb; $queried_object = get_queried_object(); $tax_query = array(); if ( ! empty( $queried_object->taxonomy ) && ! empty( $queried_object->term_id ) ) { $tax_query[] = array( 'taxonomy' => $queried_object->taxonomy, 'terms' => array( $queried_object->term_id ), 'field' => 'term_id', ); } $tax_query = new WP_Tax_Query( $tax_query ); $tax_query_sql = $tax_query->get_sql( 'pm', 'post_id' ); $search_in_statuses = apply_filters( 'jet-smart-filters/dynamic-min-max/search-statuses', array( 'publish' ) ); $search_in_statuses = implode( ', ', array_map( function( $status ) { return '\'' . $status . '\''; }, $search_in_statuses ) ); $sql = "SELECT min( FLOOR( pm.meta_value ) ) as min, max( CEILING( pm.meta_value ) ) as max FROM $wpdb->postmeta AS pm"; $sql .= " INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id"; $sql .= $tax_query_sql['join']; $sql .= " WHERE pm.meta_key IN ('" . str_replace( ',', '\',\'', str_replace( ' ', '', $key ) ) . "')"; $sql .= " AND p.post_status IN ( $search_in_statuses )"; $sql .= $tax_query_sql['where']; $data = $wpdb->get_results( $sql, ARRAY_A ); if ( ! empty( $data ) ) { return $data[0]; } else { return array(); } } /** * Callback to get min/max value for meta key */ function jet_smart_filters_term_meta_values( $args = array() ) { $key = ! empty( $args['key'] ) ? $args['key'] : false; if ( ! $key ) { return array(); } global $wpdb; $sql = "SELECT min( FLOOR( tm.meta_value ) ) as min, max( CEILING( tm.meta_value ) ) as max FROM $wpdb->termmeta AS tm"; $sql .= " WHERE tm.meta_key IN ('" . str_replace( ',', '\',\'', str_replace( ' ', '', $key ) ) . "')"; $data = $wpdb->get_results( $sql, ARRAY_A ); if ( ! empty( $data ) ) { return $data[0]; } else { return array(); } } /** * Callback to get min/max value for meta key */ function jet_smart_filters_user_meta_values( $args = array() ) { $key = ! empty( $args['key'] ) ? $args['key'] : false; if ( ! $key ) { return array(); } global $wpdb; $sql = "SELECT min( FLOOR( um.meta_value ) ) as min, max( CEILING( um.meta_value ) ) as max FROM $wpdb->usermeta AS um"; $sql .= " WHERE um.meta_key IN ('" . str_replace( ',', '\',\'', str_replace( ' ', '', $key ) ) . "')"; $data = $wpdb->get_results( $sql, ARRAY_A ); if ( ! empty( $data ) ) { return $data[0]; } else { return array(); } } /** * Returns current currency symbol */ function jet_smart_filters_woo_currency_symbol() { $currency = apply_filters( 'jet-smart-filters/woocommerce/currency-symbol', get_woocommerce_currency_symbol() ); return $currency; } /** * Do macros inside string */ function jet_smart_filters_macros( $string, $field_value = null ) { $macros = apply_filters( 'jet-smart-filters/macros/macros-list', array( 'woocommerce_currency_symbol' => 'jet_smart_filters_woo_currency_symbol', ) ); return preg_replace_callback( '/%([a-z_-]+)(\|[a-z0-9_-]+)?%/', function ( $matches ) use ( $macros, $field_value ) { $found = $matches[1]; if ( ! isset( $macros[ $found ] ) ) { return $matches[0]; } $cb = $macros[ $found ]; if ( ! is_callable( $cb ) ) { return $matches[0]; } $args = isset( $matches[2] ) ? ltrim( $matches[2], '|' ) : false; return call_user_func( $cb, $field_value, $args ); }, $string ); }
Warning: session_start(): Session cannot be started after headers have already been sent in /srv/users/benmetcalfe/apps/ewc/public/wp-content/plugins/jet-data-importer/jet-data-importer.php on line 371
Home | Essence Wellness Clinic

Working from the inside out

Working from the inside out means understanding that true beauty starts with nourishing the body and mind. It’s about encouraging clients to adopt healthy habits that enhance their natural beauty and radiance.

About Essence Wellness Clinic

About

A be spoke approach to facials and skin services. Laura, an international and national trained senior therapist who’s been in the industry for 15+ years. Lauras main focus is total client satisfaction and her unique approach to look within and in her words work backwards to get long lasting lifetime results with exceptional professional products and the latest advanced skin technology. whether its relaxing and glowing, correcting and treating, or creating a skin Maintenace plan, our years of expertise means we can Analyse diagnose and recommend the right course of action for all your unique personalized skin.

Knowledge is power, 

The key to successful healthy glowing skin is understanding what your skin needs and why, here at EWC, we place a huge emphasis on educating you about what your skin is presenting, and which ingredients and treatments will support your best to reach those skin concerns and goals. 

With never ending streams of misinformation from social media, we as professionals are here to guide and walk alongside you through your wellness journey.  

"Such a calming and relaxing atmosphere and had the best time. Have not had time to focus on me for a while and it was amazing to see the difference after just one session. Highly recommend and will be a regular customer!"
–Danielle Brady
"Thank you for personalising a plan specific to my needs, the results so far have got me excited for what’s to come! You have a way of making every session calming and you go the extra mile for your clients. I’ll continue to drive the distance for your service"
–Courtney Hardwick

Contact us

Leave a message and we will get back to you

Search

My Account

Login

Register

Registration disabled