Skip to content

Instantly share code, notes, and snippets.

@karlpotter
Last active October 12, 2021 21:28
Show Gist options
  • Save karlpotter/5f4687f9653858a1e1444b377909f2f5 to your computer and use it in GitHub Desktop.
Save karlpotter/5f4687f9653858a1e1444b377909f2f5 to your computer and use it in GitHub Desktop.
add_filter( 'fg_entryautomation_ftp_connection_params', function( $params, $protocol ) {
// If this is not an SFTP connection, return.
if ( $protocol !== 'sftp' ) {
return $params;
}
// Add private key to connection params.
$params['privateKey'] = 'PRIVATE KEY GOES HERE';
return $params;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment