Created
December 17, 2016 17:26
-
-
Save shivapoudel/8f40615c3f700a6274577d598718d1d9 to your computer and use it in GitHub Desktop.
WooCommerce - Allow rendering of checkout and account pages in iframes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
Thanks for the snippet. Solved the issue we were running into.