Hooks and filters
| Hook | Type | Use |
|---|---|---|
wpas_gf_hs_mapped_payload | filter ( $payload, $entry, $form, $is_update ) | Change the properties before they are sent. |
wpas_gf_hs_oauth_scope | filter | Change the OAuth scopes. |
wpas_gf_hs_max_file_bytes | filter | Change the maximum file size. |
wpas_gf_hs_file_folder_path | filter | Change the HubSpot Files folder. |
wpas_gf_hs_prefill_cache_seconds | filter | Change the Two-Way Sync cache time (default 600). |
wpas_gf_hs_is_licensed | filter ( bool $licensed ) | Override the license result. |
wpas_gf_hs_recommended_api_url | filter | Source of the Recommended Plugins list. |
wpas_gf_hs_log_recorded | action | Runs after a log row is written. |
wpas_gf_hs_register_providers | action ( $registry ) | Register another CRM provider. |
Example
add_filter( 'wpas_gf_hs_mapped_payload', function ( array $payload, array $entry, array $form, bool $is_update ) {
$payload['hs_lead_status'] = 'NEW';
return $payload;
}, 10, 4 );
The property must exist in HubSpot.
Constant for wp-config.php
WPAS_CRM_ENCRYPTION_KEY: your own key material for encrypting credentials. Define it so changing the WordPress salts does not make saved credentials unreadable.