Shop Manager – View Only.js

add_action(‘admin_menu’, function () { $user = wp_get_current_user(); if (!in_array(‘shop_manager_-_view_only’, (array) $user->roles)) { return; } global $menu, $submenu; // Top-level menu whitelist $allowed_top = [ ‘index.php’, // Dashboard ‘woocommerce’, // WooCommerce ‘users.php’, // Users ‘woocommerce-marketing’, // Marketing ]; foreach ($menu as…Continue reading

Donation Fee Calculation

/** * 2. Calculate the exact Stripe Fee (2.9% + .30) if “Yes” is selected */ add_filter( ‘charitable_get_donation_amount’, function( $amount, $data ) { if ( isset( $data[‘cover_fee_choice’] ) && ‘yes’ === $data[‘cover_fee_choice’] ) { // Reverse math formula: (Amount +…Continue reading

Donation Fee Radio Field

/** * 1. Register the Required Yes/No Radio Field */ add_action( ‘init’, function() { if ( ! class_exists( ‘Charitable_Donation_Field’ ) ) return; $field = new Charitable_Donation_Field( ‘cover_fee_choice’, array( ‘label’ => __( ‘Would you like your donation to cover third-party credit…Continue reading

Donation Fee Radio Field

/** * 1. Register the Required Yes/No Radio Field */ add_action( ‘init’, function() { if ( ! class_exists( ‘Charitable_Donation_Field’ ) ) return; $field = new Charitable_Donation_Field( ‘cover_fee_choice’, array( ‘label’ => __( ‘Would you like your donation to cover third-party credit…Continue reading

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

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