Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit b7f3294

Browse files
committed
fix fatal on WP_Error do to missing root namespace
1 parent cedb330 commit b7f3294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RestApi/Controllers/ProductAttributes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function register_routes() {
7979
*/
8080
public function get_items_permissions_check( $request ) {
8181
if ( ! current_user_can( 'edit_posts' ) ) {
82-
return new WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woo-gutenberg-products-block' ), array( 'status' => rest_authorization_required_code() ) );
82+
return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woo-gutenberg-products-block' ), array( 'status' => rest_authorization_required_code() ) );
8383
}
8484
return true;
8585
}

0 commit comments

Comments
 (0)