This file contains 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 ( ! function_exists( 'electro_template_loop_tags' ) ) { | |
/** | |
* Output Product Tags | |
* | |
*/ | |
function electro_template_loop_tags() { | |
global $product; | |
$product_id = electro_wc_get_product_id( $product ); | |
$tags = wc_get_product_tag_list( $product_id ); |
This file contains 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 my_wc_hide_in_stock_message( $html, $product ) { | |
if ( $product->is_in_stock() ) { | |
return ''; | |
} | |
return $html; | |
} | |
add_filter( 'woocommerce_get_stock_html', 'my_wc_hide_in_stock_message', 10, 2 ); |
This file contains 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 | |
/** sample of css and js to create a custom loading animation to cover the full facet area | |
** change #facet-container to a id or class of container element for your facets | |
** update css as needed | |
** please see https://facetwp.com/documentation/support/ for questions | |
**/ | |
add_action( 'wp_head', function() { ?> | |
<style> | |
#facet-container { |
This file contains 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 | |
/** | |
* Login Form | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
This file contains 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( 'wp_footer', 'facetwp_date_range_in_single_calendar',100); | |
function facetwp_date_range_in_single_calendar() { | |
?> | |
<script> | |
(function($) { | |
if ( 'undefined' !== typeof FWP ) { | |
FWP.hooks.addFilter('facetwp/set_options/date_range', function(flatpickr_opts, extras) { |
This file contains 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 | |
if ( ! function_exists( 'woocommerce_catalog_ordering' ) ) { | |
/** | |
* Output facet sort box instead of woocommerce's | |
*/ | |
function woocommerce_catalog_ordering() { | |
echo facetwp_display( 'sort' ); | |
} | |
} |
This file contains 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 | |
/* | |
* This code uses the original function and | |
* adds a shortcode functionality to display the product loop with | |
* the products that are available adding also another shortcode for | |
* products that are unavailable | |
* | |
* Usage: [bookable_products start="2019-10-10" end="2019-10-15"] | |
* [unbookable_products start="2019-10-10" end="2019-10-15"] | |
* |
This file contains 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 | |
/* | |
Template Name: Bookings Person types list | |
*/ | |
?> | |
<?php get_header(); ?> | |
<?php | |
This file contains 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
/* globals FWP */ | |
/** | |
* JavaScript for FacetWP Infinite Scroll | |
*/ | |
( function( $ ) { | |
'use-strict'; | |
var throttleTimer = null; | |
var throttleDelay = 100; |
NewerOlder