Skip to content

Instantly share code, notes, and snippets.

@torbentschechne
Forked from shivapoudel/functions.php
Created August 25, 2018 11:19
Show Gist options
  • Save torbentschechne/d2d412109403495d18efdad0821eb31a to your computer and use it in GitHub Desktop.
Save torbentschechne/d2d412109403495d18efdad0821eb31a to your computer and use it in GitHub Desktop.
WooCommerce - Allow rendering of checkout and account pages in iframes
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
add_action( 'after_setup_theme', 'wc_remove_frame_options_header', 11 );
/**
* Allow rendering of checkout and account pages in iframes.
*/
function wc_remove_frame_options_header() {
remove_action( 'template_redirect', 'wc_send_frame_options_header' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment