PHP 클래스 WC_Helper_Product

This helper class should ONLY be used for unit tests!.
파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

공개 메소드들

메소드 설명
create_attribute ( ) : array Create a dummy attribute.
create_external_product ( ) : WC_Product_External Create external product.
create_grouped_product ( ) : WC_Product_Grouped Create grouped product.
create_product_review ( $product_id, $review_content = 'Review content here' ) : integer Creates a new product review on a specific product.
create_simple_product ( ) : WC_Product_Simple Create simple product.
create_variation_product ( ) : WC_Product_Variable Create a dummy variation product.
delete_attribute ( $attribute_id ) Delete an attribute.
delete_product ( $product_id ) Delete a product.

메소드 상세

create_attribute() 공개 정적인 메소드

Create a dummy attribute.
부터: 2.3
public static create_attribute ( ) : array
리턴 array

create_external_product() 공개 정적인 메소드

Create external product.
부터: 2.7.0
public static create_external_product ( ) : WC_Product_External
리턴 WC_Product_External

create_grouped_product() 공개 정적인 메소드

Create grouped product.
부터: 2.7.0
public static create_grouped_product ( ) : WC_Product_Grouped
리턴 WC_Product_Grouped

create_product_review() 공개 정적인 메소드

Creates a new product review on a specific product.
부터: 2.7
public static create_product_review ( $product_id, $review_content = 'Review content here' ) : integer
$product_id integer Product ID that the review is for
리턴 integer Product Review ID

create_simple_product() 공개 정적인 메소드

Create simple product.
부터: 2.3
public static create_simple_product ( ) : WC_Product_Simple
리턴 WC_Product_Simple

create_variation_product() 공개 정적인 메소드

Create a dummy variation product.
부터: 2.3
public static create_variation_product ( ) : WC_Product_Variable
리턴 WC_Product_Variable

delete_attribute() 공개 정적인 메소드

Delete an attribute.
부터: 2.3
public static delete_attribute ( $attribute_id )
$attribute_id

delete_product() 공개 정적인 메소드

Delete a product.
public static delete_product ( $product_id )
$product_id