関数
Utils::adminErrorResponse( string $method, string $amazon_order_status )
Prepares error response object for nag dialog box.
パラメータ パラメータ
- $method
(文字列) (必須)
- $amazon_order_status
(文字列) (必須)
ファイル: src/V1/Utils.php
public static function adminErrorResponse($method, $amazon_order_status) { $res = []; switch ($amazon_order_status) { case 'captured': $res['message'] = __('This order has already been captured. It cannot be modified.', 'wcexaap'); break; case 'canceled': $res['message'] = __('This order has already been cancelled. It cannot be modified.', 'wcexaap'); break; } $res['method'] = $method; $res['status'] = 'error'; return $res; }