PHP 클래스 WC_Product_External

External products cannot be bought; they link offsite. Extends simple products.
저자: WooThemes
상속: extends WC_Product
파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$extra_data array Stores product data.

공개 메소드들

메소드 설명
__construct ( integer | WC_Product | object $product ) Merges external product data into the parent object.
add_to_cart_text ( ) : string Get the add to cart button text.
add_to_cart_url ( ) : string Get the add to url used mainly in loops.
get_button_text ( string $context = 'view' ) : string Get button text.
get_product_url ( string $context = 'view' ) : string Get product url.
get_type ( ) : string Get internal type.
is_purchasable ( ) : boolean Returns false if the product cannot be bought.
set_backorders ( string $backorders ) xternal products cannot be backordered.
set_button_text ( string $button_text ) Set button text.
set_manage_stock ( $manage_stock ) External products cannot be stock managed.
set_product_url ( string $product_url ) Set product URL.
set_stock_status ( $stock_status = '' ) External products cannot be stock managed.
single_add_to_cart_text ( ) : string Get the add to cart button text for the single page.

보호된 메소드들

메소드 설명
read_product_data ( ) Read post data.
update_post_meta ( ) Helper method that updates all the post meta for an external product.

메소드 상세

__construct() 공개 메소드

Merges external product data into the parent object.
public __construct ( integer | WC_Product | object $product )
$product integer | WC_Product | object Product to init.

add_to_cart_text() 공개 메소드

Get the add to cart button text.
public add_to_cart_text ( ) : string
리턴 string

add_to_cart_url() 공개 메소드

Get the add to url used mainly in loops.
public add_to_cart_url ( ) : string
리턴 string

get_button_text() 공개 메소드

Get button text.
public get_button_text ( string $context = 'view' ) : string
$context string
리턴 string

get_product_url() 공개 메소드

Get product url.
public get_product_url ( string $context = 'view' ) : string
$context string
리턴 string

get_type() 공개 메소드

Get internal type.
public get_type ( ) : string
리턴 string

is_purchasable() 공개 메소드

Returns false if the product cannot be bought.
public is_purchasable ( ) : boolean
리턴 boolean

read_product_data() 보호된 메소드

Read post data.
부터: 2.7.0
protected read_product_data ( )

set_backorders() 공개 메소드

xternal products cannot be backordered.
부터: 2.7.0
public set_backorders ( string $backorders )
$backorders string Options: 'yes', 'no' or 'notify'.

set_button_text() 공개 메소드

Set button text.
부터: 2.7.0
public set_button_text ( string $button_text )
$button_text string Button text.

set_manage_stock() 공개 메소드

External products cannot be stock managed.
부터: 2.7.0
public set_manage_stock ( $manage_stock )

set_product_url() 공개 메소드

Set product URL.
부터: 2.7.0
public set_product_url ( string $product_url )
$product_url string Product URL.

set_stock_status() 공개 메소드

External products cannot be stock managed.
부터: 2.7.0
public set_stock_status ( $stock_status = '' )

single_add_to_cart_text() 공개 메소드

Get the add to cart button text for the single page.
public single_add_to_cart_text ( ) : string
리턴 string

update_post_meta() 보호된 메소드

Helper method that updates all the post meta for an external product.
부터: 2.7.0
protected update_post_meta ( )

프로퍼티 상세

$extra_data 보호되어 있는 프로퍼티

Stores product data.
protected array $extra_data
리턴 array