Google_Sheet_Helpers::select_gsspreadsheet_from_gsdrive()

Method select_gsspreadsheet_from_gsdrive


Return Return

(void)


Source Source

File: src/integrations/google-sheet/helpers/google-sheet-helpers.php

	public function select_gsspreadsheet_from_gsdrive() {
		global $uncanny_automator;

		// Nonce and post object validation
		$uncanny_automator->utilities->ajax_auth_check( $_POST );

		$fields = array();

		if ( ! isset( $_POST ) ) {
			echo wp_json_encode( $fields );
			die();
		}

		$gs_drive_id = sanitize_text_field( $_POST['values']['GSDRIVE'] );

		$fields = $this->api_get_spreadsheets_from_drive( $gs_drive_id );

		echo wp_json_encode( $fields );
		die();
	}