WordPress at Your Fingertips
function is not described

WC_Embed::init() public WC 2.4.11

Init embed class.

{} It's a method of the class: WC_Embed{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Embed::init();

Changelog

Since 2.4.11 Introduced.

Code of WC_Embed::init() WC 5.8.0

public static function init() {

	// Filter all of the content that's going to be embedded.
	add_filter( 'the_excerpt_embed', array( __CLASS__, 'the_excerpt' ), 10 );

	// Make sure no comments display. Doesn't make sense for products.
	add_action( 'embed_content_meta', array( __CLASS__, 'remove_comments_button' ), 5 );

	// In the comments place let's display the product rating.
	add_action( 'embed_content_meta', array( __CLASS__, 'get_ratings' ), 5 );

	// Add some basic styles.
	add_action( 'embed_head', array( __CLASS__, 'print_embed_styles' ) );
}