関数
Wishlist::maybeClearCart( array $args, array $payload )
Clears cart if clearCart
is set in $payload
パラメータ パラメータ
- $args
(配列) (必須) URI parameters. Unused
- $payload
(配列) (必須) The array parsed from
json_encoded
data stored in$_POST['payload']
.- 'clearCart'
(bool)Iftrue
, the cart will be cleared before adding an item to it.
- 'clearCart'
ファイル: src/API/Wishlist.php
public function maybeClearCart(array $args, array $payload) { global $usces; if (!empty($payload['clearCart'])) { $usces->cart->clear_cart(); } }