wc_send_frame_options_header

When loading sensitive checkout or account pages, send a HTTP header to limit rendering of pages to same origin iframes for security reasons.

Description

wc_send_frame_options_header(); 

Can be disabled with: remove_action( template_redirect,, wc_send_frame_options_header );


Usage

  1. if ( !function_exists( 'wc_send_frame_options_header' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_send_frame_options_header(); 
  7.  

Defined (1)

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

/includes/wc-template-functions.php  
  1. function wc_send_frame_options_header() { 
  2. if ( is_checkout() || is_account_page() ) { 
  3. send_frame_options_header();