Method |
Description |
|
bulk ( array $data ) : array |
Bulk update or insert coupons
Accepts an array with coupons in the formats supported by
WC_API_Coupons->create_coupon() and WC_API_Coupons->edit_coupon() |
|
create_coupon ( array $data ) : array |
Create a coupon |
|
delete_coupon ( integer $id, boolean $force = false ) : array |
Delete a coupon |
|
edit_coupon ( integer $id, array $data ) : array |
Edit a coupon |
|
get_coupon ( integer $id, string $fields = null ) : array | WP_Error |
Get the coupon for the given ID |
|
get_coupon_by_code ( string $code, string $fields = null ) : integer | WP_Error |
Get the coupon for the given code |
|
get_coupons ( string $fields = null, array $filter = [], integer $page = 1 ) : array |
Get all coupons |
|
get_coupons_count ( array $filter = [] ) : array |
Get the total number of coupons |
|
register_routes ( array $routes ) : array |
Register the routes for this class |
|