VERY IMPORTANT – Updates Express Checkout Elements

const update_apple_pay_button = () => { let target_container = jQuery( ‘.eh_payapal_express_checkout_button’ ); let target_button = jQuery( ‘.apple-pay-button’ ); if ( target_container.length == 0 || target_button.length == 0 ) { return; } target_button = target_button.clone( true ); let current_button_style = target_button.attr(…Continue reading

Auto-Launches quizz

jQuery( document ).ready(() => { let hash = window.location.hash; let contains_hash = ( hash == ‘#quiz’ ); if ( contains_hash ) { Marquiz.showModal( ’62a10a9ab692e000277a518a’ ); } });Continue reading

Adds Klaviyo form to footer

jQuery( document ).ready(() => { let p_element = jQuery( “p:contains(‘At Terra Health Essentials, we believe that prevention is key and are committed to empowering people to take control of their health by educating them about optimal gut function and improving…Continue reading

Frontend – Remove WooCommerce Mini Cart

const removeWCMC = () => { let current_url = window.location.href.toLowerCase(); if ( !current_url.includes( “/checkout” ) ) { return; } let mini_cart = jQuery( “.woocommerce-mini-cart” ); if ( mini_cart.length == 0 ) { return; } let inner_container = mini_cart.closest( “.gm-inner” );…Continue reading

Quiz Button

(function(w, d, s, o){ var j = d.createElement(s); j.async = true; j.src = ‘//script.marquiz.io/v2.js’;j.onload = function() { if (document.readyState !== ‘loading’) Marquiz.init(o); else document.addEventListener(“DOMContentLoaded”, function() { Marquiz.init(o); }); }; d.head.insertBefore(j, d.head.firstElementChild); })(window, document, ‘script’, { host: ‘//quiz.marquiz.io’, region: ‘us’, id:…Continue reading

Change rating tooltip colors

/* change #000 in both places below to change the background, change #FFF to change the text color, change #F7D578 to change the link color */ .tasty-recipes-static-tooltip { background-color:#000 !important; color:#FFF !important; } .tasty-recipes-static-tooltip:after { border-top-color:#000 !important; } a.tasty-recipes-scrollto {…Continue reading

Remove unused JS // functions.php

function remove_unused_js() { // Globale Variable für die wp_enqueue_scripts-Aktion global $wp_scripts; // Array mit Dateinamen ungenutzter JS-Dateien $unused_js = array( ‘jquery-migrate.min.js’, // Beispiel ); // Durchlaufen aller registrierten Skripte foreach ( $wp_scripts->registered as $handle => $script ) { // Wenn…Continue reading

Untitled Snippet

function decodeSerial() { let serial = document.getElementById(“serialNumberInput”).value; let vserial = serial.replace(/\s/g, ”); let vserialtype = “”; let vyear = “”; let vmonth = “”; let vampmonth = “”; let vtype = “”; let vstyle = “”; let vweek = “”;…Continue reading