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 ) { $current = get_post_meta( $coupon_id, ‘_rd_hide_coupon_code_public’, true ); $description = ‘If ticked,…Continue reading
// == 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 (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 (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 * ============================================================================= * – 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
// 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
/** * Auto-complete orders that contain ONLY virtual items, * but ONLY after payment is confirmed. * EXCLUDES EFT / Direct Bank Transfer (bacs). */ add_action( “woocommerce_payment_complete”, “vg_autocomplete_virtual_orders_after_payment”, 20 ); function vg_autocomplete_virtual_orders_after_payment( $order_id ) { if ( ! $order_id )…Continue reading
@ini_set( ‘upload_max_filesize’ , ‘128M’ ); @ini_set( ‘post_max_size’, ‘128M’); @ini_set( ‘memory_limit’, ‘256M’ ); @ini_set( ‘max_execution_time’, ‘300’ );Continue reading
add_filter( ‘aioseo_ai_assistant_block_enabled’, ‘__return_false’ );Continue reading
if (!function_exists(‘rd_rr_table_exists’)) { function rd_rr_table_exists(string $table): bool { global $wpdb; $found = $wpdb->get_var($wpdb->prepare(“SHOW TABLES LIKE %s”, $table)); return !empty($found); } } if (!function_exists(‘rd_rr_round_down_step’)) { function rd_rr_round_down_step(int $value, int $step): int { if ($step prefix . ‘grp_google_stats’; if (!rd_rr_table_exists($stats_table)) { return…Continue reading