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_clear_quick_view() { | |
// Removes Default Actions in Quick View | |
remove_action( 'wpbf_woo_quick_view_product_image', 'woocommerce_show_product_images' ); | |
remove_action( 'wpbf_woo_quick_view_product_summary', 'woocommerce_template_single_title' ); | |
remove_action( 'wpbf_woo_quick_view_product_summary', 'woocommerce_template_single_rating' ); | |
remove_action( 'wpbf_woo_quick_view_product_summary', 'woocommerce_template_single_price' ); | |
remove_action( 'wpbf_woo_quick_view_product_summary', 'woocommerce_template_single_excerpt' ); | |
remove_action( 'wpbf_woo_quick_view_product_summary', 'woocommerce_template_single_add_to_cart' ); | |
remove_action( 'wpbf_woo_quick_view_product_summary', 'woocommerce_template_single_meta' ); |
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_sequential_order_yaymail_shortcode( $shortcode_list, $yaymail_informations, $args = array() ) { | |
// Real Order Lookup | |
if (isset ($args['order'])) { | |
$order = $args['order']; | |
$order_id = $order->get_order_number(); | |
return $order_id; | |
} | |
// YayMail Preview | |
return 'PRE_XXXX'; |
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; | |
} |
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
// 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 | |
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
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 | |
// 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 |
OlderNewer