/** * VVWC Helper Functions */ // Elementor safety post injection (used during cron) function vvwc_inject_dummy_post_context() { if ( defined( ‘DOING_CRON’ ) && DOING_CRON ) { global $post; if ( ! isset( $post ) || ! $post instanceof WP_Post )…Continue reading
add_action(‘wp_footer’, function () { ?>Continue reading
// Remove the default add to cart button remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 10 ); // Add custom add to cart form for both simple and variable products add_action( ‘woocommerce_after_shop_loop_item’, ‘custom_add_to_cart_form_on_shop_page’, 10 ); function custom_add_to_cart_form_on_shop_page() { global $product; if ( $product->is_type( ‘simple’…Continue reading
function wpcb_hide_admin_notices() { ?>Continue reading
function your_prefix_om_defer_script( $campaign_embed ) { $campaign_embed = str_replace( ‘s.async=true;’, ‘s.defer=true;’, $campaign_embed ); return $campaign_embed; }; add_filter( ‘optin_monster_campaign_embed_output’, ‘your_prefix_om_defer_script’ ); add_filter( ‘optin_monster_embed_script_tag’, ‘your_prefix_om_defer_script’ );Continue reading
// returning false will change the default location from footer to the head add_filter( ‘optin_monster_api_loading_location’, ‘__return_false’ );Continue reading
add_action( ‘frm_entries_footer_scripts’, ‘trigger_sweetalert_for_form_6’, 20, 2 ); function trigger_sweetalert_for_form_6( $fields, $form ) { if ( $form->id == 6 ) { ?>Continue reading