Specified where the Exception is coming from

This commit is contained in:
Khan M Rashedun-Naby 2018-06-25 15:04:49 +06:00
parent 21c5dacdb1
commit cb945a8816
1 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,7 @@ defined( 'ABSPATH' ) || exit;
* @param int $order_id Order ID.
* @param array $item_array Items list.
*
* @throws Exception When validation fails.
* @throws Exception When `WC_Data_Store::load` validation fails.
* @return int|bool Item ID or false
*/
function wc_add_order_item( $order_id, $item_array ) {
@ -48,7 +48,7 @@ function wc_add_order_item( $order_id, $item_array ) {
* @param int $item_id Item ID.
* @param array $args Either `order_item_type` or `order_item_name`.
*
* @throws Exception When validation fails.
* @throws Exception When `WC_Data_Store::load` validation fails.
* @return bool True if successfully updated, false otherwise.
*/
function wc_update_order_item( $item_id, $args ) {
@ -69,7 +69,7 @@ function wc_update_order_item( $item_id, $args ) {
*
* @param int $item_id Item ID.
*
* @throws Exception When validation fails.
* @throws Exception When `WC_Data_Store::load` validation fails.
* @return bool
*/
function wc_delete_order_item( $item_id ) {
@ -98,7 +98,7 @@ function wc_delete_order_item( $item_id ) {
* @param string $meta_value Meta value.
* @param string $prev_value Previous value (default: '').
*
* @throws Exception When validation fails.
* @throws Exception When `WC_Data_Store::load` validation fails.
* @return bool
*/
function wc_update_order_item_meta( $item_id, $meta_key, $meta_value, $prev_value = '' ) {
@ -118,7 +118,7 @@ function wc_update_order_item_meta( $item_id, $meta_key, $meta_value, $prev_valu
* @param string $meta_value Meta value.
* @param bool $unique If meta data should be unique (default: false).
*
* @throws Exception When validation fails.
* @throws Exception When `WC_Data_Store::load` validation fails.
* @return int New row ID or 0.
*/
function wc_add_order_item_meta( $item_id, $meta_key, $meta_value, $unique = false ) {
@ -140,7 +140,7 @@ function wc_add_order_item_meta( $item_id, $meta_key, $meta_value, $unique = fal
* @param string $meta_value Meta value (default: '').
* @param bool $delete_all Delete all meta data, defaults to `false`.
*
* @throws Exception When validation fails.
* @throws Exception When `WC_Data_Store::load` validation fails.
* @return bool
*/
function wc_delete_order_item_meta( $item_id, $meta_key, $meta_value = '', $delete_all = false ) {
@ -159,7 +159,7 @@ function wc_delete_order_item_meta( $item_id, $meta_key, $meta_value = '', $dele
* @param string $key Meta key.
* @param bool $single Whether to return a single value. (default: true).
*
* @throws Exception When validation fails.
* @throws Exception When `WC_Data_Store::load` validation fails.
* @return mixed
*/
function wc_get_order_item_meta( $item_id, $key, $single = true ) {
@ -172,7 +172,7 @@ function wc_get_order_item_meta( $item_id, $key, $single = true ) {
*
* @param int $item_id Item ID.
*
* @throws Exception When validation fails.
* @throws Exception When `WC_Data_Store::load` validation fails.
* @return int
*/
function wc_get_order_id_by_order_item_id( $item_id ) {