PluginProbe
Tutor LMS – eLearning and online course solution / 4.0.0
Tutor LMS – eLearning and online course solution v4.0.0
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 All 191 releases
← All changes | models/CartModel.php +2 -3 trunk4.0.0 View file →
@@ -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'];