WC_Shortcodes
in package
WooCommerce Shortcodes class.
Table of Contents
- best_selling_products() : string
- List best selling products on sale.
- cart() : string
- Cart page shortcode.
- checkout() : string
- Checkout page shortcode.
- featured_products() : string
- Output featured products.
- init() : mixed
- Init shortcodes.
- my_account() : string
- My account page shortcode.
- order_by_rating_post_clauses() : array
- Order by rating.
- order_tracking() : string
- Order tracking page shortcode.
- product() : string
- Display a single product.
- product_add_to_cart() : string
- Display a single product price + cart button.
- product_add_to_cart_url() : string
- Get the add to cart URL for a product.
- product_attribute() : string
- List products with an attribute shortcode.
- product_categories() : string
- List all (or limited) product categories.
- product_category() : string
- List products in a category shortcode.
- product_page() : string
- Show a single product page.
- products() : string
- List multiple products shortcode.
- recent_products() : string
- Recent Products shortcode.
- related_products() : string
- List related products.
- sale_products() : string
- List all products on sale.
- shop_messages() : string
- Show messages.
- shortcode_wrapper() : string
- Shortcode Wrapper.
- top_rated_products() : string
- List top rated products on sale.
Methods
best_selling_products()
List best selling products on sale.
public
static best_selling_products(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringcart()
Cart page shortcode.
public
static cart() : string
Return values
stringcheckout()
Checkout page shortcode.
public
static checkout(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringfeatured_products()
Output featured products.
public
static featured_products(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringinit()
Init shortcodes.
public
static init() : mixed
Return values
mixedmy_account()
My account page shortcode.
public
static my_account(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringorder_by_rating_post_clauses()
Order by rating.
public
static order_by_rating_post_clauses(array $args) : array
Parameters
- $args : array
-
Query args.
Tags
Return values
arrayorder_tracking()
Order tracking page shortcode.
public
static order_tracking(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringproduct()
Display a single product.
public
static product(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringproduct_add_to_cart()
Display a single product price + cart button.
public
static product_add_to_cart(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringproduct_add_to_cart_url()
Get the add to cart URL for a product.
public
static product_add_to_cart_url(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringproduct_attribute()
List products with an attribute shortcode.
public
static product_attribute(array $atts) : string
Example [product_attribute attribute="color" filter="black"].
Parameters
- $atts : array
-
Attributes.
Return values
stringproduct_categories()
List all (or limited) product categories.
public
static product_categories(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringproduct_category()
List products in a category shortcode.
public
static product_category(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringproduct_page()
Show a single product page.
public
static product_page(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringproducts()
List multiple products shortcode.
public
static products(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringrecent_products()
Recent Products shortcode.
public
static recent_products(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringrelated_products()
List related products.
public
static related_products(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringsale_products()
List all products on sale.
public
static sale_products(array $atts) : string
Parameters
- $atts : array
-
Attributes.
Return values
stringshop_messages()
Show messages.
public
static shop_messages() : string
Return values
stringshortcode_wrapper()
Shortcode Wrapper.
public
static shortcode_wrapper(string[] $function[, array $atts = array() ][, array $wrapper = array('class' => 'woocommerce', 'before' => null, 'after' => null) ]) : string
Parameters
- $function : string[]
-
Callback function.
- $atts : array = array()
-
Attributes. Default to empty array.
- $wrapper : array = array('class' => 'woocommerce', 'before' => null, 'after' => null)
-
Customer wrapper data.
Return values
stringtop_rated_products()
List top rated products on sale.
public
static top_rated_products(array $atts) : string
Parameters
- $atts : array
-
Attributes.