Sorry for not answering before, but I droped using the plugin and made myself an implementation in my theme, so if I can help you here’s how I could make it work.
Basically I put some Footnotes along the flexible content text, textarea and wysiwyg, collected all the footnotes and after that, inserted the shortcode to show in the last acf content.
Here’s the code:
$footnotes = CustomFootnotes::getInstance();
add_filter('the_content', [$footnotes, 'processText']);
add_filter('timber/context', function ($context) use ($footnotes) {
$context['footnotes'] = CustomFootnotes::getInstance()->toArray();
return $context;
});
//add filter to acf fields
add_filter('acf/format_value/type=text', [$footnotes, 'processText'], 10, 3);
add_filter('acf/format_value/type=textarea', [$footnotes, 'processText'], 10, 3);
add_filter('acf/format_value/type=wysiwyg', [$footnotes, 'processText'], 10, 3);
//add shortcode for footnotes
add_shortcode('footnotes', [$footnotes, 'show']);
Thank you anyway for your attention!