get_lists();
- $list_ids = array_map(
+ $list_id = $attributes['list_id'] ?? '';
+ $form_id = wp_unique_id( $list_id . '_' );
+
+ // Stable per-form analytics id from the block attribute. Empty for legacy
+ // blocks not yet re-saved
+ $mc_analytics_form_id = Mailchimp_Forms_Registry::sanitize_form_id( $attributes['formId'] ?? '' );
+ $lists = ( new Mailchimp_List_Subscribe_Form_Blocks() )->get_lists();
+ $list_ids = array_map(
function ( $single_list ) {
return $single_list['id'];
},
@@ -105,8 +109,11 @@ function ( $single_list ) {
}
?>
-