Google_Sheet_Helpers::select_gsworksheet_from_gsspreadsheet()

Method select_gsworksheet_from_gsspreadsheet


Return Return

(void)


Source Source

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

	public function select_gsworksheet_from_gsspreadsheet() {
		global $uncanny_automator;

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

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

		$gs_spreadsheet_id = sanitize_text_field( $_POST['values']['GSSPREADSHEET'] );

		$fields = $this->api_get_worksheets_from_spreadsheet( $gs_spreadsheet_id );

		echo wp_json_encode( $fields );

		die();
	}