Function: tcp get product by sku

Description

Returns a product of the given sku.

Usage

<?php echo tcp_get_product_by_sku( $sku ); ?>

Parameters

$sku 
(Text) The SKU to search.
$object 
(Boolean) Optional. To return the object or only the id. If no products is found the functions returns false.
Return 
(Integer/Post Object/false) Post id if exists one or more products with the SKU given and the param object is set to false (by default). A Post Object if the param Object is set to true. Or false if not product is found.

Examples

Change Log

Since 1.2.5

Related