wpdatatables_filter_google_sheet_array

Contents

Description

This filter allows you to modify the raw array of data fetched from a Google Sheet before it is processed and displayed as a table.

Usage

add_filter( 'wpdatatables_filter_google_sheet_array', 'customize_google_sheet_data', 10, 3 );

Parameters

  • $sheetArray array
    The raw array of data fetched from the Google Sheet.
  • $wpId int
    The table ID.
  • $sheetURL string
    The URL of the Google Sheet being used as the data source.

Examples

// Callback function for the wpdatatables_filter_google_sheet_array filter
function customize_google_sheet_data($sheetArray, $wpId, $sheetURL) {
    // Your code here

    return $sheetArray;
}

add_filter( 'wpdatatables_filter_google_sheet_array', 'customize_google_sheet_data', 10, 3 );