Skip to content

Instantly share code, notes, and snippets.

@shivapoudel
Created December 17, 2016 17:26
Show Gist options
  • Save shivapoudel/8f40615c3f700a6274577d598718d1d9 to your computer and use it in GitHub Desktop.
Save shivapoudel/8f40615c3f700a6274577d598718d1d9 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' );
}
@mhackersu
Copy link

@shivapoudel grateful for your contribution.

@adnanhz
Copy link

adnanhz commented Jan 2, 2019

Thanks for the contribution !!!!!111!1!!

@wywarren
Copy link

wywarren commented Jul 9, 2020

Thanks for the snippet. Solved the issue we were running into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment