WC_Embed::is_embedded_product()public staticWC 2.4.11

Check if this is an embedded product - to make sure we don't mess up regular posts.

Method of the class: WC_Embed{}

No Hooks.

Return

true|false.

Usage

$result = WC_Embed::is_embedded_product();

Changelog

Since 2.4.11 Introduced.

WC_Embed::is_embedded_product() code WC 8.9.0

public static function is_embedded_product() {
	if ( function_exists( 'is_embed' ) && is_embed() && is_product() ) {
		return true;
	}
	return false;
}