PHP 클래스 WC_Product_Factory

The WooCommerce product factory creating the right product object
저자: WooThemes
파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

공개 메소드들

메소드 설명
get_classname_from_product_type ( string $product_type ) : string | false Create a WC coding standards compliant class name e.g. WC_Product_Type_Class instead of WC_Product_type-class.
get_product ( mixed $product_id = false, array $deprecated = [] ) : WC_Product | boolean Get a product.
get_product_type ( integer $product_id ) : string | false Get the product type for a product.

비공개 메소드들

메소드 설명
get_product_id ( mixed $product ) : integer | boolean Get the product ID depending on what was passed.

메소드 상세

get_classname_from_product_type() 공개 정적인 메소드

Create a WC coding standards compliant class name e.g. WC_Product_Type_Class instead of WC_Product_type-class.
public static get_classname_from_product_type ( string $product_type ) : string | false
$product_type string
리턴 string | false

get_product() 공개 메소드

Get a product.
public get_product ( mixed $product_id = false, array $deprecated = [] ) : WC_Product | boolean
$product_id mixed (default: false)
$deprecated array
리턴 WC_Product | boolean Product object or null if the product cannot be loaded.

get_product_type() 공개 정적인 메소드

Get the product type for a product.
부터: 2.7.0
public static get_product_type ( integer $product_id ) : string | false
$product_id integer
리턴 string | false