=== GSheets Connector ===
Contributors: raoinfotech
Tags: Sheets,Sync Posts & Custom Post Types, Automation,Google Sheets,Google Spreadsheets
Requires at least: 5.2
Tested up to: 6.7
Requires PHP: 8.0
Stable tag: 1.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Sync your WordPress posts, custom post types, and WooCommerce orders, including custom fields, to Google Spreadsheets using available filter hooks.
== Description ==
Get real time POST, CPT, Woocommerce Order along with meta fields mapping on sheets, easy mapping and configuration with each column and Post Column.

This plugin uses [Google Sheets API](https://sheets.googleapis.com/v4/spreadsheets/) and [Google Drive API](https://www.googleapis.com/drive/v3/files) to sync 
wordpress data with google sheets. 
[Google Oauth](https://oauth2.googleapis.com/token) for generating the token for authorizing Google API's.

== Configuration ==
1. Visit [Google Cloud](https://console.cloud.google.com/)
2. Create New Project
3. Enable Google Sheets API & Google Drive API from API & Services Library
4. Create Credentials for Service Account
5. Save JSON object Credentials under plugin settings page
5. Share Service accouts email on Google sheets with edit access
6. Create first Sheetlink Integration

== Creating Integration ==
[youtube https://youtu.be/qbxnyyoab48]

## Available Filter Hooks

GSheets Connector is developer friendly and has some filters available to add the custom fields

1. Add additional data options while creating integrations
` 
    apply_filters( 'rgsi_data_options', $data );

    add_filter( 'rgsi_data_options', function($data) {
        //Need to add prefix _custom_ in order to feed the custom data in rgsi_mapped_data hook
        $data['_custom_company_id'] = "Company ID"
        return $data;
    });
`

2. Filter Output data before being sent to sheet
`
    apply_filters( 'rgsi_mapped_data',$parsed_data, $post,$custom_keys );

    add_filter( 'rgsi_mapped_data', function( $parsed_data, $post, $custom_keys ){ 
        return $parsed_data;
    });

`

== Data Privacy ==
The Application obtains the following information when you use the built-in app for authentication and link the Application with your Google Drive Account:	
1. Your WordPress website address.
2. A short-lived access token gets generated by the OAuth flow.	
3. Service account Credentials in JSON format are encrypted and saved into the database. This credential is used for fetching and validating the access token.
4. Access token is validated using [GoogleApis Token Info](https://www.googleapis.com/oauth2/v1/tokeninfo) endpoint
5. A short lived access token is retrieved using endpoint [Googleapis Oauth2](https://oauth2.googleapis.com/token) by sending JWT encoded Private key and client_email
6. Retrieved access token is used to accesss list of spreadsheets with the help of [Google Drive API](https://www.googleapis.com/drive/v3/files) and [Google Spreadsheets API](https://sheets.googleapis.com/v4/spreadsheets/) that has been shared with client email [Google Drive](https://www.googleapis.com/drive/v3/files) and update spreadsheet data with the help of [Spreadsheers API](https://sheets.googleapis.com/v4/spreadsheets/)
	
**IMPORTANT:** When you use the Application, all other communications are strictly between your server and the cloud storage service servers. The communication is encrypted and the communication will not go through our servers. We do not collect and do not have access to your files.
Read more : [RaoInformation Technology Privacy Policy](https://raoinformationtechnology.com/privacy-policy/)

## Privacy Policy 
GSheets Connector uses [Appsero](https://appsero.com) SDK to collect some telemetry data upon user's confirmation. This helps us to troubleshoot problems faster & make product improvements.

Appsero SDK **does not gather any data by default.** The SDK only starts gathering basic telemetry data **when a user allows it via the admin notice**. We collect the data to ensure a great user experience for all our users. 

Integrating Appsero SDK **DOES NOT IMMEDIATELY** start gathering data, **without confirmation from users in any case.**

Learn more about how [Appsero collects and uses this data](https://appsero.com/privacy-policy/).

== Change Log == 

## v1.0.0
= Initial Version

##  v1.1.0
= Fix Create Type Integration adding multiple times
= Added registeration date support for user type
= Add custom filter hooks to support custom fields

## v1.1.0
= Fix Feedbackform Url
= Integrate AppSero Analytics