wc_prevent_endpoint_indexing()

No index our endpoints.


Description Description

Prevent indexing pages like order-received.


Source Source

File: includes/wc-template-functions.php

function wc_prevent_endpoint_indexing() {
	if ( is_wc_endpoint_url() || isset( $_GET['download_file'] ) ) { // WPCS: input var ok, CSRF ok.
		@header( 'X-Robots-Tag: noindex' ); // @codingStandardsIgnoreLine
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.5.3 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.