wp_ajax_ hooks | WordPress.org

[ad_1]

Hello! Can you please advise me if I can use wp_ajax_sync_properties as Standard Cron event Hook name? Even though it’s wp_ajax_ hook and it’s used as AJAX action somewhere else?

class PropertySync {

    public static function init() {
        add_action('wp_ajax_sync_properties', array(__CLASS__, 'sync_properties_callback'));
    }
    
    public static function sync_properties_callback() {
        // Function code
    }

}

PropertySync::init();

Thanks in advance!

  • This topic was modified 5 hours, 59 minutes ago by egornmore.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer