| @@ -45,9 +45,9 @@ | ||
| 45 | 45 | * @param int $course_id Course ID. |
| 46 | 46 | * @param string $item_type Cart item type. |
| 47 | 47 | * @param mixed $item_details Cart item details. |
| 48 | 48 | * |
| 49 | - * @return int Inserted row ID on success, 0 otherwise. | |
| 49 | + * @return array Array containing the result of the insert operation. | |
| 50 | 50 | */ |
| 51 | 51 | public function add_course_to_cart( $user_id, $course_id, $item_type = '', $item_details = '' ) { |
| 52 | 52 | global $wpdb; |
| 53 | 53 | |
| @@ -146,10 +146,9 @@ | ||
| 146 | 146 | $joining_tables, |
| 147 | 147 | $select_columns, |
| 148 | 148 | $where, |
| 149 | 149 | array(), |
| 150 | - 'item.id', | |
| 151 | - -1 | |
| 150 | + 'item.id' | |
| 152 | 151 | ); |
| 153 | 152 | } |
| 154 | 153 | |
| 155 | 154 | $result = $is_details ? $cart_data : $cart_data['courses']['results']; |