79276268

Date: 2024-12-12 18:59:54
Score: 3
Natty:
Report link

Thanks @ChrisHaas for figuring it out. The solution was to use the fully qualified class name and since it was a static function the correct code was:

<?php 
add_action( 'wp_ajax_nopriv_run_cff_clear_feed', 'myCFFclearFeed');

function myCFFclearFeed() {
   require_once '/var/www/wp-content/plugins/custom-facebook-feed-pro/inc/Builder/CFF_Feed_Saver_Manager.php';
      require_once '/var/www/wp-content/plugins/custom-facebook-feed-pro/inc/CFF_Cache.php';
\CustomFacebookFeed\Builder\CFF_Feed_Saver_Manager::clear_single_feed_cache();
                }
?> 

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @ChrisHaas
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Mike Muller