@@ -201,7 +201,7 @@ |
||
| 201 | 201 | /** |
| 202 | 202 | * Parse file path and see if its remote or local. |
| 203 | 203 | * @param string $file_path |
| 204 | - * @return array |
|
| 204 | + * @return string |
|
| 205 | 205 | */ |
| 206 | 206 | public static function parse_file_path( $file_path ) { |
| 207 | 207 | $wp_uploads = wp_upload_dir(); |
@@ -160,7 +160,7 @@ |
||
| 160 | 160 | * Set the current, active gateway. |
| 161 | 161 | * |
| 162 | 162 | * @access public |
| 163 | - * @param array $gateway Available payment gateways. |
|
| 163 | + * @param array $gateways Available payment gateways. |
|
| 164 | 164 | */ |
| 165 | 165 | public function set_current_gateway( $gateways ) { |
| 166 | 166 | |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | /** |
| 202 | 202 | * Parse file path and see if its remote or local. |
| 203 | 203 | * @param string $file_path |
| 204 | - * @return array |
|
| 204 | + * @return string |
|
| 205 | 205 | */ |
| 206 | 206 | public static function parse_file_path( $file_path ) { |
| 207 | 207 | $wp_uploads = wp_upload_dir(); |
@@ -184,7 +184,7 @@ |
||
| 184 | 184 | * |
| 185 | 185 | * @param stdClass $user |
| 186 | 186 | * @param array $params The request parameters. |
| 187 | - * @return null|WP_Error |
|
| 187 | + * @return stdClass |
|
| 188 | 188 | */ |
| 189 | 189 | private function check_oauth_signature( $user, $params ) { |
| 190 | 190 | $http_method = strtoupper( $_SERVER['REQUEST_METHOD'] ); |
@@ -285,7 +285,7 @@ discard block |
||
| 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 |
||
| 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'] ) ) { |
@@ -890,7 +890,7 @@ |
||
| 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 |
@@ -955,7 +955,7 @@ |
||
| 955 | 955 | * |
| 956 | 956 | * @param WP_REST_Request $request Full details about the request. |
| 957 | 957 | * @param WP_Post $post Post data. |
| 958 | - * @return int|WP_Error |
|
| 958 | + * @return integer |
|
| 959 | 959 | */ |
| 960 | 960 | protected function update_order( $request, $post ) { |
| 961 | 961 | try { |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | /** |
| 116 | 116 | * Get post types. |
| 117 | 117 | * |
| 118 | - * @return array |
|
| 118 | + * @return string[] |
|
| 119 | 119 | */ |
| 120 | 120 | protected function get_post_types() { |
| 121 | 121 | return array( 'product', 'product_variation' ); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | /** |
| 136 | 136 | * Get post types. |
| 137 | 137 | * |
| 138 | - * @return array |
|
| 138 | + * @return string[] |
|
| 139 | 139 | */ |
| 140 | 140 | protected function get_post_types() { |
| 141 | 141 | return array( $this->post_type ); |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | * |
| 231 | 231 | * @param WP_Post $post |
| 232 | 232 | * @param WP_REST_Request $request |
| 233 | - * @return bool|WP_Error |
|
| 233 | + * @return boolean |
|
| 234 | 234 | */ |
| 235 | 235 | protected function add_post_meta_fields( $post, $request ) { |
| 236 | 236 | return true; |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | * |
| 685 | 685 | * @param WP_Post $post |
| 686 | 686 | * @param WP_REST_Request $request |
| 687 | - * @return bool|WP_Error |
|
| 687 | + * @return boolean |
|
| 688 | 688 | */ |
| 689 | 689 | protected function update_post_meta_fields( $post, $request ) { |
| 690 | 690 | return true; |