[NOT IN USE – Zorem Customer Email Verification] Hide Billing Fields After Email Until Verified

(function () { const fieldSelectors = [ ‘#billing_phone_field’, ‘#billing_company_field’, ‘#billing_address_1_field’, ‘#billing_address_2_field’, ‘#billing_city_field’, ‘#billing_postcode_field’, ‘#billing_state_field’, ‘#billing_country_field’ ]; const klaviyoSelectors = [ ‘#kl_newsletter_checkbox_field’, ‘#kl_sms_consent_checkbox_field’ ]; function setVisibility(selectors, show) { selectors.forEach(selector => { const el = document.querySelector(selector); if (el) { el.style.display = show…Continue reading

[NOT IN USE – Zorem Customer Email Verification] Change Verification Code Input to Number Format

document.addEventListener(‘DOMContentLoaded’, function () { const observer = new MutationObserver(function () { const codeInput = document.querySelector(‘input[name=”cev_billing_email”]’); if (codeInput && !codeInput.hasAttribute(‘inputmode’)) { codeInput.setAttribute(‘inputmode’, ‘numeric’); } }); observer.observe(document.body, { childList: true, subtree: true }); });Continue reading

[IN PROGRESS] Inject data-product-tags into all products

add_action(‘woocommerce_before_single_product’, function () { global $post; if (!is_product()) return; $product = wc_get_product($post->ID); if (!$product) return; $tags = wp_get_post_terms($post->ID, ‘product_tag’, [‘fields’ => ‘names’]); $tag_string = !empty($tags) ? esc_attr(implode(‘, ‘, $tags)) : ”; echo ‘Continue reading

Untitled Snippet

‘options’ => array( ” => ‘Maak een keuze’, ‘Google’ => ‘Google’, ‘Via Marktplaats’ => ‘Via Marktplaats’, ‘ChatGPT’ => ‘ChatGPT’, ‘Facebook’ => ‘Facebook’, ‘Instagram’ => ‘Instagram’, ‘Via een vriend of kennis’ => ‘Via een vriend of kennis’, ‘Anders’ => ‘Anders’, ),Continue reading

ACFW – Fraud prevention on one-time coupons

add_action( ‘woocommerce_checkout_process’, function() { $coupon_code = ‘your_coupon_code’; $billing_phone = wc_clean( wp_unslash( $_POST[‘billing_phone’] ?? ” ) ); $billing_addr1 = strtolower( wc_clean( wp_unslash( $_POST[‘billing_address_1’] ?? ” ) ) ); if ( ! WC()->cart ) { return; } $applied = array_map( ‘wc_format_coupon_code’, WC()->cart->get_applied_coupons()…Continue reading