This commit is contained in:
Mike Jolley 2019-06-13 14:40:04 +01:00
parent 525716e5cb
commit e0d4032452
5 changed files with 11 additions and 11 deletions

View File

@ -191,7 +191,7 @@ abstract class AbstractObjectsController extends AbstractController {
* @since 3.0.0
* @param \WP_REST_Request $request Full details about the request.
* @param bool $creating If is creating a new object.
* @return WC_Data|\WP_Error
* @return \WC_Data|\WP_Error
*/
protected function save_object( $request, $creating = false ) {
try {
@ -531,7 +531,7 @@ abstract class AbstractObjectsController extends AbstractController {
* Return false to disable trash support for the object.
*
* @param boolean $supports_trash Whether the object type support trashing.
* @param WC_Data $object The object being considered for trashing support.
* @param \WC_Data $object The object being considered for trashing support.
*/
return apply_filters( "woocommerce_rest_{$this->post_type}_object_trashable", $supports_trash, $object );
}

View File

@ -126,7 +126,7 @@ class Coupons extends AbstractObjectsController {
*
* @since 3.0.0
* @param int $id Object ID.
* @return WC_Data
* @return \WC_Data
*/
protected function get_object( $id ) {
return new \WC_Coupon( $id );
@ -217,7 +217,7 @@ class Coupons extends AbstractObjectsController {
* refers to object type being prepared for the response.
*
* @param \WP_REST_Response $response The response object.
* @param WC_Data $object Object data.
* @param \WC_Data $object Object data.
* @param \WP_REST_Request $request Request object.
*/
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
@ -306,7 +306,7 @@ class Coupons extends AbstractObjectsController {
* The dynamic portion of the hook name, `$this->post_type`,
* refers to the object type slug.
*
* @param WC_Data $coupon Object object.
* @param \WC_Data $coupon Object object.
* @param \WP_REST_Request $request Request object.
* @param bool $creating If is creating a new object.
*/

View File

@ -228,7 +228,7 @@ class Customers extends AbstractController {
/**
* Get formatted item data.
*
* @param WC_Data $object WC_Data instance.
* @param \WC_Data $object WC_Data instance.
*
* @since 3.0.0
* @return array

View File

@ -321,7 +321,7 @@ class Orders extends AbstractObjectsController {
/**
* Prepare links for the request.
*
* @param WC_Data $object Object data.
* @param \WC_Data $object Object data.
* @param \WP_REST_Request $request Request object.
* @return array Links for the given post.
*/

View File

@ -586,7 +586,7 @@ class Products extends AbstractObjectsController {
* The dynamic portion of the hook name, `$this->post_type`,
* refers to the object type slug.
*
* @param WC_Data $product Object object.
* @param \WC_Data $product Object object.
* @param \WP_REST_Request $request Request object.
* @param bool $creating If is creating a new object.
*/
@ -1391,7 +1391,7 @@ class Products extends AbstractObjectsController {
/**
* Clear caches here so in sync with any new variations/children.
*
* @param WC_Data $object Object data.
* @param \WC_Data $object Object data.
*/
public function clear_transients( $object ) {
wc_delete_product_transients( $object->get_id() );
@ -1439,7 +1439,7 @@ class Products extends AbstractObjectsController {
* Return false to disable trash support for the object.
*
* @param boolean $supports_trash Whether the object type support trashing.
* @param WC_Data $object The object being considered for trashing support.
* @param \WC_Data $object The object being considered for trashing support.
*/
$supports_trash = apply_filters( "woocommerce_rest_{$this->post_type}_object_trashable", $supports_trash, $object );
@ -1517,7 +1517,7 @@ class Products extends AbstractObjectsController {
/**
* Fires after a single object is deleted or trashed via the REST API.
*
* @param WC_Data $object The deleted or trashed object.
* @param \WC_Data $object The deleted or trashed object.
* @param \WP_REST_Response $response The response data.
* @param \WP_REST_Request $request The request sent to the API.
*/