PHP Класс MC4WP_API_v3

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$client MC4WP_API_v3_Client
$connected Are we able to talk to the MailChimp API?

Открытые методы

Метод Описание
__construct ( string $api_key ) Constructor
add_ecommerce_store ( array $args ) : object
add_ecommerce_store_cart ( string $store_id, array $args ) : object
add_ecommerce_store_cart_line ( string $store_id, string $cart_id, array $args ) : object
add_ecommerce_store_customer ( $store_id, array $args ) : object Add OR update a store customer
add_ecommerce_store_order ( string $store_id, array $args ) : object
add_ecommerce_store_order_line ( string $store_id, string $order_id, array $args ) : object
add_ecommerce_store_product ( string $store_id, array $args ) : object Add a product to a store
add_ecommerce_store_product_variant ( string $store_id, string $product_id, array $args ) : object Add OR update a product variant.
add_list_member ( string $list_id, array $args ) : object Add or update (!) a member to a MailChimp list.
add_list_members ( string $list_id, array $args ) : object Batch subscribe / unsubscribe list members.
delete_ecommerce_store ( string $store_id ) : boolean
delete_ecommerce_store_cart ( string $store_id, string $cart_id ) : boolean
delete_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id ) : boolean
delete_ecommerce_store_customer ( string $store_id, string $customer_id ) : boolean
delete_ecommerce_store_order ( string $store_id, string $order_id ) : boolean
delete_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id ) : boolean
delete_ecommerce_store_product ( string $store_id, string $product_id ) : boolean
delete_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id ) : boolean
delete_list_member ( string $list_id, string $email_address ) : boolean
get_ecommerce_store ( string $store_id, array $args = [] ) : object
get_ecommerce_store_cart ( string $store_id, string $cart_id, array $args = [] ) : object
get_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id, array $args = [] ) : object
get_ecommerce_store_cart_lines ( string $store_id, string $cart_id, array $args = [] ) : object
get_ecommerce_store_carts ( string $store_id, array $args = [] ) : object
get_ecommerce_store_customer ( string $store_id, string $customer_id, array $args = [] ) : object
get_ecommerce_store_customers ( string $store_id, array $args = [] ) : object
get_ecommerce_store_order ( string $store_id, string $order_id, array $args = [] ) : object
get_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id, array $args = [] ) : object
get_ecommerce_store_order_lines ( string $store_id, string $order_id, array $args = [] ) : object
get_ecommerce_store_orders ( string $store_id, array $args = [] ) : object
get_ecommerce_store_product ( string $store_id, string $product_id, array $args = [] ) : object
get_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id, array $args = [] ) : object
get_ecommerce_store_product_variants ( string $store_id, string $product_id, array $args = [] ) : object
get_ecommerce_store_products ( string $store_id, array $args = [] ) : object
get_last_response_body ( ) : string
get_last_response_headers ( ) : array
get_list ( string $list_id, array $args = [] ) : object
get_list_activity ( string $list_id ) : array Get recent daily, aggregated activity stats for a list.
get_list_interest_categories ( string $list_id, array $args = [] ) : array Gets the interest categories for a given List
get_list_interest_category_interests ( string $list_id, string $interest_category_id, array $args = [] ) : array
get_list_member ( string $list_id, string $email_address, array $args = [] ) : object
get_list_merge_fields ( string $list_id, array $args = [] ) : array Get merge vars for a given list
get_lists ( array $args = [] ) : array
get_subscriber_hash ( $email_address ) : string
is_connected ( ) : boolean Pings the MailChimp API to see if we're connected
update_ecommerce_store ( string $store_id, array $args ) : object
update_ecommerce_store_cart ( string $store_id, string $cart_id, array $args ) : object
update_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id, array $args ) : object
update_ecommerce_store_customer ( string $store_id, string $customer_id, array $args ) : object
update_ecommerce_store_order ( string $store_id, string $order_id, array $args ) : object
update_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id, array $args ) : object
update_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id, array $args ) : object
update_list_member ( $list_id, $email_address, array $args ) : object

Описание методов

__construct() публичный Метод

Constructor
public __construct ( string $api_key )
$api_key string

add_ecommerce_store() публичный Метод

public add_ecommerce_store ( array $args ) : object
$args array
Результат object

add_ecommerce_store_cart() публичный Метод

public add_ecommerce_store_cart ( string $store_id, array $args ) : object
$store_id string
$args array
Результат object

add_ecommerce_store_cart_line() публичный Метод

public add_ecommerce_store_cart_line ( string $store_id, string $cart_id, array $args ) : object
$store_id string
$cart_id string
$args array
Результат object

add_ecommerce_store_customer() публичный Метод

Add OR update a store customer
public add_ecommerce_store_customer ( $store_id, array $args ) : object
$store_id
$args array
Результат object

add_ecommerce_store_order() публичный Метод

public add_ecommerce_store_order ( string $store_id, array $args ) : object
$store_id string
$args array
Результат object

add_ecommerce_store_order_line() публичный Метод

public add_ecommerce_store_order_line ( string $store_id, string $order_id, array $args ) : object
$store_id string
$order_id string
$args array
Результат object

add_ecommerce_store_product() публичный Метод

Add a product to a store
public add_ecommerce_store_product ( string $store_id, array $args ) : object
$store_id string
$args array
Результат object

add_ecommerce_store_product_variant() публичный Метод

Add OR update a product variant.
public add_ecommerce_store_product_variant ( string $store_id, string $product_id, array $args ) : object
$store_id string
$product_id string
$args array
Результат object

add_list_member() публичный Метод

Add or update (!) a member to a MailChimp list.
public add_list_member ( string $list_id, array $args ) : object
$list_id string
$args array
Результат object

add_list_members() публичный Метод

Batch subscribe / unsubscribe list members.
public add_list_members ( string $list_id, array $args ) : object
$list_id string
$args array
Результат object

delete_ecommerce_store() публичный Метод

public delete_ecommerce_store ( string $store_id ) : boolean
$store_id string
Результат boolean

delete_ecommerce_store_cart() публичный Метод

public delete_ecommerce_store_cart ( string $store_id, string $cart_id ) : boolean
$store_id string
$cart_id string
Результат boolean

delete_ecommerce_store_cart_line() публичный Метод

public delete_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id ) : boolean
$store_id string
$cart_id string
$line_id string
Результат boolean

delete_ecommerce_store_customer() публичный Метод

public delete_ecommerce_store_customer ( string $store_id, string $customer_id ) : boolean
$store_id string
$customer_id string
Результат boolean

delete_ecommerce_store_order() публичный Метод

public delete_ecommerce_store_order ( string $store_id, string $order_id ) : boolean
$store_id string
$order_id string
Результат boolean

delete_ecommerce_store_order_line() публичный Метод

public delete_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id ) : boolean
$store_id string
$order_id string
$line_id string
Результат boolean

delete_ecommerce_store_product() публичный Метод

public delete_ecommerce_store_product ( string $store_id, string $product_id ) : boolean
$store_id string
$product_id string
Результат boolean

delete_ecommerce_store_product_variant() публичный Метод

public delete_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id ) : boolean
$store_id string
$product_id string
$variant_id string
Результат boolean

delete_list_member() публичный Метод

public delete_list_member ( string $list_id, string $email_address ) : boolean
$list_id string
$email_address string
Результат boolean

get_ecommerce_store() публичный Метод

public get_ecommerce_store ( string $store_id, array $args = [] ) : object
$store_id string
$args array
Результат object

get_ecommerce_store_cart() публичный Метод

public get_ecommerce_store_cart ( string $store_id, string $cart_id, array $args = [] ) : object
$store_id string
$cart_id string
$args array
Результат object

get_ecommerce_store_cart_line() публичный Метод

public get_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id, array $args = [] ) : object
$store_id string
$cart_id string
$line_id string
$args array
Результат object

get_ecommerce_store_cart_lines() публичный Метод

public get_ecommerce_store_cart_lines ( string $store_id, string $cart_id, array $args = [] ) : object
$store_id string
$cart_id string
$args array
Результат object

get_ecommerce_store_carts() публичный Метод

public get_ecommerce_store_carts ( string $store_id, array $args = [] ) : object
$store_id string
$args array
Результат object

get_ecommerce_store_customer() публичный Метод

public get_ecommerce_store_customer ( string $store_id, string $customer_id, array $args = [] ) : object
$store_id string
$customer_id string
$args array
Результат object

get_ecommerce_store_customers() публичный Метод

public get_ecommerce_store_customers ( string $store_id, array $args = [] ) : object
$store_id string
$args array
Результат object

get_ecommerce_store_order() публичный Метод

public get_ecommerce_store_order ( string $store_id, string $order_id, array $args = [] ) : object
$store_id string
$order_id string
$args array
Результат object

get_ecommerce_store_order_line() публичный Метод

public get_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id, array $args = [] ) : object
$store_id string
$order_id string
$line_id string
$args array
Результат object

get_ecommerce_store_order_lines() публичный Метод

public get_ecommerce_store_order_lines ( string $store_id, string $order_id, array $args = [] ) : object
$store_id string
$order_id string
$args array
Результат object

get_ecommerce_store_orders() публичный Метод

public get_ecommerce_store_orders ( string $store_id, array $args = [] ) : object
$store_id string
$args array
Результат object

get_ecommerce_store_product() публичный Метод

public get_ecommerce_store_product ( string $store_id, string $product_id, array $args = [] ) : object
$store_id string
$product_id string
$args array
Результат object

get_ecommerce_store_product_variant() публичный Метод

public get_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id, array $args = [] ) : object
$store_id string
$product_id string
$variant_id string
$args array
Результат object

get_ecommerce_store_product_variants() публичный Метод

public get_ecommerce_store_product_variants ( string $store_id, string $product_id, array $args = [] ) : object
$store_id string
$product_id string
$args array
Результат object

get_ecommerce_store_products() публичный Метод

public get_ecommerce_store_products ( string $store_id, array $args = [] ) : object
$store_id string
$args array
Результат object

get_last_response_body() публичный Метод

public get_last_response_body ( ) : string
Результат string

get_last_response_headers() публичный Метод

public get_last_response_headers ( ) : array
Результат array

get_list() публичный Метод

public get_list ( string $list_id, array $args = [] ) : object
$list_id string
$args array
Результат object

get_list_activity() публичный Метод

Get recent daily, aggregated activity stats for a list.
public get_list_activity ( string $list_id ) : array
$list_id string
Результат array

get_list_interest_categories() публичный Метод

Gets the interest categories for a given List
public get_list_interest_categories ( string $list_id, array $args = [] ) : array
$list_id string
$args array
Результат array

get_list_interest_category_interests() публичный Метод

public get_list_interest_category_interests ( string $list_id, string $interest_category_id, array $args = [] ) : array
$list_id string
$interest_category_id string
$args array
Результат array

get_list_member() публичный Метод

public get_list_member ( string $list_id, string $email_address, array $args = [] ) : object
$list_id string
$email_address string
$args array
Результат object

get_list_merge_fields() публичный Метод

Get merge vars for a given list
public get_list_merge_fields ( string $list_id, array $args = [] ) : array
$list_id string
$args array
Результат array

get_lists() публичный Метод

public get_lists ( array $args = [] ) : array
$args array
Результат array

get_subscriber_hash() публичный Метод

public get_subscriber_hash ( $email_address ) : string
$email_address
Результат string

is_connected() публичный Метод

The result is cached to ensure a maximum of 1 API call per page load
public is_connected ( ) : boolean
Результат boolean

update_ecommerce_store() публичный Метод

public update_ecommerce_store ( string $store_id, array $args ) : object
$store_id string
$args array
Результат object

update_ecommerce_store_cart() публичный Метод

public update_ecommerce_store_cart ( string $store_id, string $cart_id, array $args ) : object
$store_id string
$cart_id string
$args array
Результат object

update_ecommerce_store_cart_line() публичный Метод

public update_ecommerce_store_cart_line ( string $store_id, string $cart_id, string $line_id, array $args ) : object
$store_id string
$cart_id string
$line_id string
$args array
Результат object

update_ecommerce_store_customer() публичный Метод

public update_ecommerce_store_customer ( string $store_id, string $customer_id, array $args ) : object
$store_id string
$customer_id string
$args array
Результат object

update_ecommerce_store_order() публичный Метод

public update_ecommerce_store_order ( string $store_id, string $order_id, array $args ) : object
$store_id string
$order_id string
$args array
Результат object

update_ecommerce_store_order_line() публичный Метод

public update_ecommerce_store_order_line ( string $store_id, string $order_id, string $line_id, array $args ) : object
$store_id string
$order_id string
$line_id string
$args array
Результат object

update_ecommerce_store_product_variant() публичный Метод

public update_ecommerce_store_product_variant ( string $store_id, string $product_id, string $variant_id, array $args ) : object
$store_id string
$product_id string
$variant_id string
$args array
Результат object

update_list_member() публичный Метод

public update_list_member ( $list_id, $email_address, array $args ) : object
$list_id
$email_address
$args array
Результат object

Описание свойств

$client защищенное свойство

protected MC4WP_API_v3_Client $client
Результат MC4WP_API_v3_Client

$connected защищенное свойство

Are we able to talk to the MailChimp API?
protected $connected