Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created July 10, 2026 13:29
Show Gist options
  • Select an option

  • Save xlplugins/3e628482d72f79ff3d65ae1472f4f97b to your computer and use it in GitHub Desktop.

Select an option

Save xlplugins/3e628482d72f79ff3d65ae1472f4f97b to your computer and use it in GitHub Desktop.
Export analytics data in UTC format
add_filter( 'wffn_export_conversion_timestamp', function ( $formatted, $local, $dt ) {
if ( $dt instanceof DateTime ) {
$utc = clone $dt; $utc->setTimezone( new DateTimeZone( 'UTC' ) );
return $utc->format( 'Y-m-d\TH:i:s\Z' ); // 2026-07-10T12:02:25Z
}
return $formatted;
}, 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment