Filter the integration metadata array (slug => label, description, is_pro, logo_url, category, url) used to render integration cards.
Metadata is used for the integrations grid (cards with label, description, logo, category). It is registered via wpd_ai_register_integration_metadata and merged with instances for display. This filter lets you change or add metadata for any slug (e.g. change label, set a custom URL, or add a new card that links elsewhere).
File: includes/integrations/WPDAI_Integrations_Manager.php
Method: get_all_integrations_for_display()
| Parameter | Type | Description |
|---|---|---|
| $integration_metadata | array | Associative array slug => array( 'label', 'description', 'is_pro', 'logo_url', 'category', 'url' ) |
Type: array
The (possibly modified) metadata array.
add_filter( 'wpd_ai_integration_metadata', 'rename_webhooks_card' );
function rename_webhooks_card( $integration_metadata ) {
if ( isset( $integration_metadata['webhooks'] ) ) {
$integration_metadata['webhooks']['label'] = __( 'Data Webhooks', 'alpha-insights-pro' );
}
return $integration_metadata;
}
add_filter( 'wpd_ai_integration_metadata', 'point_facebook_to_custom_url' );
function point_facebook_to_custom_url( $integration_metadata ) {
if ( isset( $integration_metadata['facebook-ads'] ) ) {
$integration_metadata['facebook-ads']['url'] = admin_url( 'admin.php?page=my-facebook-page' );
}
return $integration_metadata;
}