PHP 클래스 WooCommerce

파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$cart WC_Cart Cart instance.
$countries WC_Countries Countries instance.
$customer WC_Customer Customer instance.
$integrations WC_Integrations Integrations instance.
$order_factory WC_Order_Factory Order factory instance.
$product_factory WC_Product_Factory Product factory instance.
$query WC_Query Query instance.
$session WC_Session Session instance.
$structured_data WC_Structured_Data Structured data instance.
$version string WooCommerce version.

보호된 프로퍼티들

프로퍼티 타입 설명
$_instance WooCommerce The single instance of the class.

공개 메소드들

메소드 설명
__clone ( ) Cloning is forbidden.
__construct ( ) WooCommerce Constructor.
__get ( mixed $key ) : mixed Auto-load in-accessible properties on demand.
__wakeup ( ) Unserializing instances of this class is forbidden.
ajax_url ( ) : string Get Ajax URL.
api_request_url ( string $request, mixed $ssl = null ) : string Return the WC API URL for a given request.
checkout ( ) : WC_Checkout Get Checkout Class.
frontend_includes ( ) Include required frontend files.
include_template_functions ( ) Function used to Init WooCommerce Template Functions - This makes them pluggable by plugins and themes.
includes ( ) Include required core files used in admin and on the frontend.
init ( ) Init WooCommerce when WordPress Initialises.
instance ( ) : WooCommerce Main WooCommerce Instance.
load_plugin_textdomain ( ) Load Localisation files.
mailer ( ) : WC_Emails Email Class.
payment_gateways ( ) : WC_Payment_Gateways Get gateways class.
plugin_path ( ) : string Get the plugin path.
plugin_url ( ) : string Get the plugin url.
setup_environment ( ) Ensure theme and server variable compatibility and setup image sizes.
shipping ( ) : WC_Shipping Get shipping class.
template_path ( ) : string Get the template path.
wpdb_table_fix ( ) WooCommerce Payment Token Meta API and Term/Order item Meta - set table names.

비공개 메소드들

메소드 설명
add_image_sizes ( ) Add WC Image sizes to WP.
add_thumbnail_support ( ) Ensure post thumbnail support is turned on.
define ( string $name, string | boolean $value ) Define constant if not already set.
define_constants ( ) Define WC Constants.
init_hooks ( ) Hook into actions and filters.
is_request ( string $type ) : boolean What type of request is this?
load_webhooks ( ) Load & enqueue active webhooks.

메소드 상세

__clone() 공개 메소드

Cloning is forbidden.
부터: 2.1
public __clone ( )

__construct() 공개 메소드

WooCommerce Constructor.
public __construct ( )

__get() 공개 메소드

Auto-load in-accessible properties on demand.
public __get ( mixed $key ) : mixed
$key mixed
리턴 mixed

__wakeup() 공개 메소드

Unserializing instances of this class is forbidden.
부터: 2.1
public __wakeup ( )

ajax_url() 공개 메소드

Get Ajax URL.
public ajax_url ( ) : string
리턴 string

api_request_url() 공개 메소드

Return the WC API URL for a given request.
public api_request_url ( string $request, mixed $ssl = null ) : string
$request string
$ssl mixed (default: null)
리턴 string

checkout() 공개 메소드

Get Checkout Class.
public checkout ( ) : WC_Checkout
리턴 WC_Checkout

frontend_includes() 공개 메소드

Include required frontend files.
public frontend_includes ( )

include_template_functions() 공개 메소드

Function used to Init WooCommerce Template Functions - This makes them pluggable by plugins and themes.

includes() 공개 메소드

Include required core files used in admin and on the frontend.
public includes ( )

init() 공개 메소드

Init WooCommerce when WordPress Initialises.
public init ( )

instance() 공개 정적인 메소드

Ensures only one instance of WooCommerce is loaded or can be loaded.
또한 보기: WC()
부터: 2.1
public static instance ( ) : WooCommerce
리턴 WooCommerce - Main instance.

load_plugin_textdomain() 공개 메소드

Note: the first-loaded translation file overrides any following ones if the same translation is present. Locales found in: - WP_LANG_DIR/woocommerce/woocommerce-LOCALE.mo - WP_LANG_DIR/plugins/woocommerce-LOCALE.mo

mailer() 공개 메소드

Email Class.
public mailer ( ) : WC_Emails
리턴 WC_Emails

payment_gateways() 공개 메소드

Get gateways class.
public payment_gateways ( ) : WC_Payment_Gateways
리턴 WC_Payment_Gateways

plugin_path() 공개 메소드

Get the plugin path.
public plugin_path ( ) : string
리턴 string

plugin_url() 공개 메소드

Get the plugin url.
public plugin_url ( ) : string
리턴 string

setup_environment() 공개 메소드

Ensure theme and server variable compatibility and setup image sizes.
public setup_environment ( )

shipping() 공개 메소드

Get shipping class.
public shipping ( ) : WC_Shipping
리턴 WC_Shipping

template_path() 공개 메소드

Get the template path.
public template_path ( ) : string
리턴 string

wpdb_table_fix() 공개 메소드

WooCommerce Payment Token Meta API and Term/Order item Meta - set table names.
public wpdb_table_fix ( )

프로퍼티 상세

$_instance 보호되어 있는 정적으로 프로퍼티

The single instance of the class.
부터: 2.1
protected static WooCommerce $_instance
리턴 WooCommerce

$cart 공개적으로 프로퍼티

Cart instance.
public WC_Cart $cart
리턴 WC_Cart

$countries 공개적으로 프로퍼티

Countries instance.
public WC_Countries $countries
리턴 WC_Countries

$customer 공개적으로 프로퍼티

Customer instance.
public WC_Customer $customer
리턴 WC_Customer

$integrations 공개적으로 프로퍼티

Integrations instance.
public WC_Integrations $integrations
리턴 WC_Integrations

$order_factory 공개적으로 프로퍼티

Order factory instance.
public WC_Order_Factory $order_factory
리턴 WC_Order_Factory

$product_factory 공개적으로 프로퍼티

Product factory instance.
public WC_Product_Factory $product_factory
리턴 WC_Product_Factory

$query 공개적으로 프로퍼티

Query instance.
public WC_Query $query
리턴 WC_Query

$session 공개적으로 프로퍼티

Session instance.
public WC_Session $session
리턴 WC_Session

$structured_data 공개적으로 프로퍼티

Structured data instance.
public WC_Structured_Data $structured_data
리턴 WC_Structured_Data

$version 공개적으로 프로퍼티

WooCommerce version.
public string $version
리턴 string