Automattic\WooCommerce\Internal\TransientFiles

TransientFilesEngine::add_endpoint()public staticWC 1.0

Handle the "init" action, add rewrite rules for the "wc/file" endpoint.

Method of the class: TransientFilesEngine{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = TransientFilesEngine::add_endpoint();

TransientFilesEngine::add_endpoint() code WC 9.3.3

public static function add_endpoint() {
	add_rewrite_rule( '^wc/file/transient/?$', 'index.php?wc-transient-file-name=', 'top' );
	add_rewrite_rule( '^wc/file/transient/(.+)$', 'index.php?wc-transient-file-name=$matches[1]', 'top' );
	add_rewrite_endpoint( 'wc/file/transient', EP_ALL );
}