public function get_product_categories( $fields = null ) {
        try {
            // Permissions check
            if ( ! current_user_can( 'manage_product_terms' ) ) {
                throw new WC_API_Exception( 'woocommerce_api_user_cannot_read_product_categories', __( 'You do not have permission to read product categories', 'woocommerce' ), 401 );