This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function mz_display_sub_cats() { | |
| $object = get_queried_object(); | |
| $current = $object->term_id; | |
| echo '<div class="cats cats_filters d-flex flex-nowrap">'; | |
| $class = ''; | |
| if( $object->parent > 0 ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add_to_cart', 10 ); | |
| /* In woocommerce/single-product/add-to-cart/variable.php file use "radio button" insead of "Select" tag | |
| * Style the radio button with their "lable" to create "Switch" UI element. | |
| * Something like that: */ | |
| $unique_id = twentytwenty_unique_id(); | |
| $unique_id = 'product_variations_div'. ($unique_id * rand(1, 999999)); | |
| $terms = wc_get_product_terms( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Removes the WooCommerce filter, that is validating the quantity to be an int | |
| remove_filter('woocommerce_stock_amount', 'intval'); | |
| // Add a filter, that validates the quantity to be a float | |
| add_filter('woocommerce_stock_amount', 'floatval'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function statusChangeCallback(response) { | |
| fbRegister(response); | |
| } | |
| jQuery('.register-button').on('click', function (e) { | |
| e.preventDefault(); | |
| ajaxRegister(); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( false === ( $customQuery = get_transient( 'projectName_related_products' ) ) ) { | |
| $args = [ | |
| 'post_type' => 'post', | |
| ]; | |
| $customQuery = new WP_Query($args); | |
| set_transient( 'projectName_related_products', $customQuery, 99999 * HOUR_IN_SECONDS ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('get_footer', function () { | |
| wp_enqueue_script( 'selectWoo' ); | |
| wp_enqueue_style( 'select2' ); | |
| wp_enqueue_script( 'delivery-js' ); | |
| }); ?> | |
| <section class="delivery position-relative"> | |
| <?php | |
| $bg = get_sub_field('bg'); | |
| if( isset($bg) && !empty($bg) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <iframe src="https://iqosiframe.ussl.co/" width="100%" height="200px" style="border: 0; position: fixed; left: 0; bottom: 0; width: 100%; max-height: 100%; transition: 0.15s ease-out height;" class="mozi_iframe"></iframe> | |
| <script> | |
| var eventMethod = window.addEventListener | |
| ? "addEventListener" | |
| : "attachEvent"; | |
| var eventer = window[eventMethod]; | |
| var messageEvent = eventMethod === "attachEvent" | |
| ? "onmessage" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <iframe src="https://iqosiframe2.ussl.co/" width="100%" height="200px" style="border: 0; position: fixed; left: 0; bottom: 0; width: 100%; max-height: 100%; transition: 0.15s ease-out height;" class="mozi_iframe"></iframe> | |
| <script> | |
| var eventMethod = window.addEventListener | |
| ? "addEventListener" | |
| : "attachEvent"; | |
| var eventer = window[eventMethod]; | |
| var messageEvent = eventMethod === "attachEvent" | |
| ? "onmessage" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static function getImage( $pic, $parent_id = '', $filename = false ) { | |
| $server = WC_LI_Settings::SERVER; | |
| $dev = get_option( 'wc_linet_dev' ); | |
| if ( $dev == 'on' ) { | |
| $server = WC_LI_Settings::DEV_SERVER; | |
| } | |
| $basePath = wp_upload_dir()['basedir'] . '/'; | |
| if( $filename ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function filter_clinics_index( $query ) { | |
| if ( !is_admin() && $query->is_main_query() && is_post_type_archive( 'clinic' )){ | |
| $meta_query = $query->get('meta_query'); | |
| if( is_array($meta_query) ) { | |
| $meta_query['order_clinic_clause'] = [ | |
| 'key' => 'order_clinic', | |
| 'compare' => 'EXISTS', | |
| 'type' => 'NUMERIC' | |
| ]; |