/**
* Plugin Name: Custom Checkout Cache Exclusion
* Description: Disables Object Caching (Redis) specifically on the WooCommerce Checkout page
* to ensure payment options are calculated correctly.
* Version: 1.0
* Author: Your Name/Company
*/
// We use 'wp_loaded' which runs after WordPress is fully loaded but before
// the headers are sent and templates are rendered.
add_action( 'wp_loaded', 'custom_disable_object_cache_on_checkout' );
/**
* Checks if the current page is the WooCommerce checkout page and conditionally
* disables object caching (e.g., Redis).
* * This is necessary because dynamic elements like payment options based on
* products/user groups can be incorrectly served from the object cache.
*/
function custom_disable_object_cache_on_checkout() {
// First, check if WooCommerce is active and its core functions are available.
if ( ! function_exists( 'is_checkout' ) ) {
return;
}
// Check if the current page is the WooCommerce checkout page.
if ( is_checkout() ) {
/**
* The WP_REDIS_DISABLED constant is typically checked very early
* by object caching plugins. Redefining it here after the main
* load sequence might not work for ALL caching solutions, but it
* often works for the standard way Redis/Redis Object Cache is
* integrated in environments like SpinupWP.
* * Note: The constant must *not* be defined in wp-config.php
* globally for this conditional logic to take effect here.
* If WP_REDIS_DISABLED is already defined as 'false' or not defined
* at all, this will redefine it to 'true' for this single request.
*/
if ( ! defined( 'WP_REDIS_DISABLED' ) || ! WP_REDIS_DISABLED ) {
// This is the core line that conditionally disables the object cache.
define( 'WP_REDIS_DISABLED', true );
// Optional: Log or display a notice for debugging (remove in production)
// error_log( 'Object Cache disabled for Checkout page request: ' . $_SERVER['REQUEST_URI'] );
}
}
}
Canadian based company focused on and committed to the Canadian allergist for over 10 years
Health Canada approved Class A lab facility designed for preparation of allergy vaccines
Widest variety of antigens and diagnostics offered in Canada
Our facility is operated by university-educated, highly trained formulators and scientists, and is inspected, licensed and monitored by Health Canada
We provide the highest quality diagnostics, treatment sets, and venom immunotherapy – Sophisticated quality control system under Health Canada GMP (Good Manufacturing Practices) Guidelines
Concentration on all quality aspects from material received to final packaging and delivery
Prior to release, all vaccines are sent to an Independent laboratory for quality sterility verification
Customized software which is both patient and physician friendly in respect to ensuring accuracy of production, delivery, and follow up
Our products were used in, and our collaborators recently published, the first papers from the Prevention of Asthma Trial (PAT). The study concluded that allergy immunotherapy prevents the onset of asthma in children with allergic rhinitis.
Allergy Canada is currently partnered with the world’s largest study on the prevention of allergy
Costumer Service
Our security-sealed orders are shipped throughout Canada by next day courier.
Our Comprehensive Patient Management System will automatically track and send out a reminder when it is time to renew your immunotherapy and allergy shots
Fastest turnaround time from order to delivery
24/7 ordering access at www.allergycanada.com
Knowledgeable and friendly customer service representatives
We provide customized dosage schedules and treatment set geared to the Doctor’s needs
Allergy Canada’s Monthly Newsletter will keep you up to date with the latest allergy information and Allergy Canada promotions