Viewing 4 replies - 1 through 4 (of 4 total)
  • You remove that with this hook:

    remove_action( 'template_redirect', 'wc_send_frame_options_header' );

    From /woocommerce/includes/wc-template-functions.php

    /**
     * When loading sensitive checkout or account pages, send a HTTP header to limit rendering of pages to same origin iframes for security reasons.
     *
     * Can be disabled with: remove_action( 'template_redirect', 'wc_send_frame_options_header' );
     *
     * @since  2.3.10
     */
    function wc_send_frame_options_header() {
    	if ( is_checkout() || is_account_page() ) {
    		send_frame_options_header();
    	}
    }
    add_action( 'template_redirect', 'wc_send_frame_options_header' );
    Plugin Contributor angelleye

    (@angelleye)

    @ignitemedia, I’m sorry I never replied. Somehow I didn’t see this post.

    @matt Thiessen, thanks for providing that info!

    it doesn’t work for me, I added
    remove_action( ‘template_redirect’, ‘wc_send_frame_options_header’ );
    inside functions.php of my template
    any idea?

    Your code might be running too late if you put it in your theme, try creating a new file: wp-content/mu-plugins/somefile.php and add your code there.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error: 'X-Frame-Options' to 'SAMEORIGIN'.’ is closed to new replies.