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
/* | |
For use with "Code" step, using JavaScript, | |
useful for renaming values that come across from triggers. | |
inputData is the Object Zapier creates for the passed values. | |
*/ | |
// Translation Table for Looking up | |
const translationTable = { | |
// "Source" : "Translation" | |
"fog-score{1}" : "Rarely", |
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 zf_cg_carousel_nav_arrows_custom($nav_arrows){ | |
$nav_arrows['left'] = '<i class="wpbff wpbff-caret-left"></i>'; | |
$nav_arrows['right'] = '<i class="wpbff wpbff-caret-right"></i>'; | |
return $nav_arrows; | |
} | |
add_filter('pp_cg_carousel_nav_arrows','zf_cg_carousel_nav_arrows_custom'); |
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 | |
// Enable Theme/Plugin Updates on FlyWheel (FIX) | |
add_action( | |
'wp_update_plugins', | |
function() { | |
if ( wp_doing_cron() && ! doing_action( 'wp_maybe_auto_update' ) ) { | |
do_action( 'wp_maybe_auto_update' ); | |
} | |
}, | |
20 |
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(defined('FL_THEME_BUILDER_VERSION')): | |
add_action( 'fl_page_data_add_properties', function() { | |
FLPageData::add_post_property( 'zf_get_post_url', array( | |
'label' => 'Post URL', | |
'group' => 'posts', | |
'type' => 'url', | |
'getter' => 'get_permalink', | |
) ); | |
} ); | |
endif; |
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_filter( 'woocommerce_dynamic_pricing_process_product_discounts', 'is_product_eligible', 10, 4 ); | |
function is_product_eligible( $eligible, $product, $discounter_name, $discounter_object ) { | |
// Remove Filter | |
remove_filter( 'woocommerce_dynamic_pricing_process_product_discounts', 'is_product_eligible', 10, 4 ); | |
// Get Cart | |
$cart = WC()->cart; | |
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
// Clickable Columns in Elementor via CSS class '.clickable-col' | |
const clickableCols = document.querySelectorAll('.clickable-col'); | |
if(clickableCols.length > 0){ | |
clickableCols.forEach(col => { | |
const link = col.querySelector('a'); | |
col.addEventListener('click', () => { | |
window.location.href = link; | |
}); | |
col.style.cursor = 'pointer'; | |
}); |
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 // Don't Include | |
// Run Scripts on Order Confirmation Endpoint in WooCommerce Once. | |
function zf_woocommerce_thankyou_scripts($order_id) { | |
// Check for meta key on order, only run if not found. | |
if( ! get_post_meta( $order_id , '_tracking_scripts_ran', true ) ) { | |
// Add meta key to order so scripts don't run a second time. | |
add_post_meta( $order_id, '_tracking_scripts_ran', 'yes', true ); ?> | |
<script type="text/javascript"> |
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 zf_set_custom_width_on_posts_bb( $defaults, $form_type ) { | |
if ( get_post_type( get_the_ID() ) == 'post' ) { | |
if( $form_type == 'row' ) { | |
$defaults->max_content_width = '800'; | |
} | |
} | |
return $defaults; | |
} |