Completed
Pull Request — master (#11058)
by Slobodan
08:05
created
includes/api/class-wc-rest-coupons-controller.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 	 *
286 286
 	 * @param WP_Post $post
287 287
 	 * @param WP_REST_Request $request
288
-	 * @return bool|WP_Error
288
+	 * @return boolean
289 289
 	 */
290 290
 	protected function add_post_meta_fields( $post, $request ) {
291 291
 		$data = $request->get_json_params();
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 	 *
341 341
 	 * @param WP_Post $post
342 342
 	 * @param WP_REST_Request $request
343
-	 * @return bool|WP_Error
343
+	 * @return boolean
344 344
 	 */
345 345
 	protected function update_post_meta_fields( $post, $request ) {
346 346
 		if ( isset( $request['amount'] ) ) {
Please login to merge, or discard this patch.
includes/abstracts/abstract-wc-rest-posts-controller.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 	 *
286 286
 	 * @param WP_Post $post
287 287
 	 * @param WP_REST_Request $request
288
-	 * @return bool|WP_Error
288
+	 * @return boolean
289 289
 	 */
290 290
 	protected function add_post_meta_fields( $post, $request ) {
291 291
 		$data = $request->get_json_params();
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 	 *
341 341
 	 * @param WP_Post $post
342 342
 	 * @param WP_REST_Request $request
343
-	 * @return bool|WP_Error
343
+	 * @return boolean
344 344
 	 */
345 345
 	protected function update_post_meta_fields( $post, $request ) {
346 346
 		if ( isset( $request['amount'] ) ) {
Please login to merge, or discard this patch.
includes/api/class-wc-rest-orders-controller.php 1 patch
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 	 * Create order.
434 434
 	 *
435 435
 	 * @param WP_REST_Request $request Full details about the request.
436
-	 * @return int|WP_Error
436
+	 * @return integer
437 437
 	 */
438 438
 	protected function create_order( $request ) {
439 439
 		wc_transaction_query( 'start' );
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
 	 * 1) Only non-protected meta (no leading underscore) can be set
810 810
 	 * 2) Meta values must be scalar (int, string, bool)
811 811
 	 *
812
-	 * @param WC_Order $order Order data.
812
+	 * @param WC_Order $order_id Order data.
813 813
 	 * @param array $meta_data Meta data in array( 'meta_key' => 'meta_value' ) format.
814 814
 	 */
815 815
 	protected function update_meta_data( $order_id, $meta_data ) {
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
 	 *
917 917
 	 * @param WP_REST_Request $request Full details about the request.
918 918
 	 * @param WP_Post $post Post data.
919
-	 * @return int|WP_Error
919
+	 * @return integer
920 920
 	 */
921 921
 	protected function update_order( $request, $post ) {
922 922
 		try {
@@ -1076,8 +1076,7 @@  discard block
 block discarded – undo
1076 1076
 	 *
1077 1077
 	 * @since 2.6.0
1078 1078
 	 * @param array $args Order args.
1079
-	 * @param WP_REST_Request $request Full details about the request.
1080
-	 * @return WC_Order|WP_Error
1079
+	 * @return WC_Order
1081 1080
 	 */
1082 1081
 	protected function create_base_order( $args, $data ) {
1083 1082
 		return wc_create_order( $args );
Please login to merge, or discard this patch.
includes/class-wc-cart.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -890,7 +890,7 @@
 block discarded – undo
890 890
 		 * @param int $variation_id
891 891
 		 * @param array $variation attribute values
892 892
 		 * @param array $cart_item_data extra cart item data we want to pass into the item
893
-		 * @return string|bool $cart_item_key
893
+		 * @return string|false $cart_item_key
894 894
 		 */
895 895
 		public function add_to_cart( $product_id = 0, $quantity = 1, $variation_id = 0, $variation = array(), $cart_item_data = array() ) {
896 896
 			// Wrap in try catch so plugins can throw an exception to prevent adding to cart
Please login to merge, or discard this patch.