Automattic\WooCommerce\EmailEditor\Engine

Email_Editor::update_preview_post_linkpublicWC 1.0

Update the preview post link to remove the preview nonce.

Method of the class: Email_Editor{}

No Hooks.

Returns

String.

Usage

$Email_Editor = new Email_Editor();
$Email_Editor->update_preview_post_link( $preview_link, $post );
$preview_link(string) (required)
The preview post link.
$post(WP_Post) (required)
The post object.

Email_Editor::update_preview_post_link() code WC 10.7.0

public function update_preview_post_link( $preview_link, $post ) {
	if ( ! $post instanceof \WP_Post ) {
		return $preview_link;
	}

	if ( ! $this->current_post_is_email_post_type( $post->post_type ) ) {
		return $preview_link;
	}

	// Remove preview_nonce from the link.
	return remove_query_arg( 'preview_nonce', $preview_link );
}