クラス
Points
ソース ソース
ファイル: src/API/Points.php
class Points
{
/**
* Apply points and return `$_SESSION['usces_entry']['order']`
*
* @author Evan D Shaw <evandanielshaw@gmail.com>
* @global \usc_e_shop $usces
* @return array
*/
public function usePoints() {
global $usces;
$error_message = $usces->point_check($usces->cart->get_entry());
if (!empty($error_message)) {
return ['error' => $error_message];
}
(new Fees())->setFees();
return (new WelcartEntries())->getOrder();
}
}
- usePoints — Apply points and return `$_SESSION['usces_entry']['order']`