edd_append_no_cache_param

Adds a ?nocache option for the checkout page.

Description

(array) edd_append_no_cache_param( (array) $settings ); 

This ensures the checkout page remains uncached when plugins like WP Super Cache are activated

Returns (array)

$settings Updated Misc Settings

Parameters (1)

0. $settings (array)
The settings.

Usage

  1. if ( !function_exists( 'edd_append_no_cache_param' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-digital-downloads/includes/plugin-compatibility.php'; 
  3.  
  4. // The settings. 
  5. $settings = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = edd_append_no_cache_param($settings); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/plugin-compatibility.php  
  1. function edd_append_no_cache_param( $settings ) { 
  2. return $settings; 
  3.  
  4. $settings[] = array( 
  5. 'id' => 'no_cache_checkout',  
  6. 'name' => __('No Caching on Checkout?', 'easy-digital-downloads' ),  
  7. 'desc' => __('Check this box in order to append a ?nocache parameter to the checkout URL to prevent caching plugins from caching the page.', 'easy-digital-downloads' ),  
  8. 'type' => 'checkbox' 
  9. ); 
  10.  
  11. return $settings;