Type: php
META CONVERSIONS API (CAPI) — PURCHASE (SERVER-SIDE)
/** * ============================================================================= * VOELGOED — META CONVERSIONS API (CAPI) — PURCHASE (SERVER-SIDE) * ============================================================================= * – Captures fbp/fbc + IP + UA at checkout into order meta * – Sends Purchase via Conversions API when order is PAID (processing/completed)…Continue reading
META PIXEL BASE + MANUAL ADVANCED MATCHING (WooCommerce/WordPress)
/** * ============================================================================= * META PIXEL BASE + MANUAL ADVANCED MATCHING (WooCommerce/WordPress) * Pixel ID: * ============================================================================= * IMPORTANT: * – Remove any other hard-coded Meta Pixel base code (to avoid duplicates). * – Only run this if you have…Continue reading
[DO NOT PUSH] Block Formidable Form Submission when Email Exists as WP User
add_filter( ‘frm_validate_field_entry’, ‘rd_ff_block_existing_user_email’, 20, 3 ); function rd_ff_block_existing_user_email( $errors, $posted_field, $posted_value ) { // REQUIRED $form_id = 0; // Formidable form ID $email_field_id = 0; // Email field ID // OPTIONAL: meta-gated blocking $only_block_if_meta_match = true; $meta_key_to_check = ‘paying_customer’; $meta_value_to_block…Continue reading
Hide Selected Coupon Code (Name) in Notices + Classic Cart/Checkout Totals
if ( ! defined( ‘ABSPATH’ ) ) { exit; } if ( class_exists( ‘WooCommerce’ ) ) { add_action( ‘woocommerce_coupon_options’, ‘rd_wc_add_hide_coupon_code_field’, 10, 2 ); function rd_wc_add_hide_coupon_code_field( $coupon_id, $coupon ) { woocommerce_wp_checkbox( array( ‘id’ => ‘_rd_hide_coupon_code_public’, ‘label’ => __( ‘Hide coupon code’,…Continue reading
JS Tickera Auto Click (PassieVol)
// == Voelgoed Auto-Click Seating Map Button == // Priority: Vanilla JS -> jQuery (fallback) // Always ensures button is clicked once it appears, regardless of timing. (function() { var MAX_ATTEMPTS = 20; // Limit retries to avoid performance issues…Continue reading
Meta Pixel – InitiateCheckout Event
/** * ============================================================================= * META PIXEL — InitiateCheckout (WooCommerce Checkout) * ============================================================================= * Fires on checkout page (not thank you). * Includes contents + value. * Adds a sessionStorage guard to reduce accidental duplicates. */ add_action(‘wp_footer’, ‘voelgoed_meta_pixel_initiate_checkout’, 20); function voelgoed_meta_pixel_initiate_checkout()…Continue reading
Meta Pixel – Purchase Event
/** * ============================================================================= * META PIXEL — Purchase (WooCommerce Thank You) — Dedup ready for CAPI * ============================================================================= * – Fires on thank-you page ONLY for paid orders (processing/completed) * – Uses variation_id when present * – Adds eventID =…Continue reading
Meta Pixel – AddToCart Event
/** * ============================================================================= * META PIXEL — AddToCart * ============================================================================= * – Single product: fires on form submit (no jQuery required) * – Archives AJAX: listens to WooCommerce ‘added_to_cart’ (requires jQuery) * – Fallback: click listener on add_to_cart_button if jQuery…Continue reading
Meta Pixel – ViewContent Event
// Track ViewContent event on product pages add_action(‘wp_footer’, ‘voelgoed_meta_pixel_view_content’); function voelgoed_meta_pixel_view_content() { if (!function_exists(‘is_product’)) return; if (is_product()) { global $product; if (!$product) return; ?>Continue reading