WooCommerce Code Reference

WC_Embed

Embed Class which handles any WooCommerce Products that are embedded on this site or another site.

Table of Contents

get_ratings()  : mixed
Prints the markup for the rating stars.
init()  : mixed
Init embed class.
is_embedded_product()  : bool
Check if this is an embedded product - to make sure we don't mess up regular posts.
print_embed_styles()  : mixed
Basic styling.
product_buttons()  : string
Create the button to go to the product page for embedded products.
remove_comments_button()  : mixed
Remove comments button on product embeds.
the_excerpt()  : string
Create the excerpt for embedded products - we want to add the buy button to it.

Methods

get_ratings()

Prints the markup for the rating stars.

public static get_ratings() : mixed
Tags
since
2.4.11
Return values
mixed

is_embedded_product()

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

public static is_embedded_product() : bool
Tags
since
2.4.11
Return values
bool

product_buttons()

Create the button to go to the product page for embedded products.

public static product_buttons() : string
Tags
since
2.4.11
Return values
string

remove_comments_button()

Remove comments button on product embeds.

public static remove_comments_button() : mixed
Tags
since
2.6.0
Return values
mixed

the_excerpt()

Create the excerpt for embedded products - we want to add the buy button to it.

public static the_excerpt(string $excerpt) : string
Parameters
$excerpt : string

Embed short description.

Tags
since
2.4.11
Return values
string