• Resolved egornmore

    (@egornmore)


    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 1 year, 1 month ago by egornmore.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    It depends entirely what you’re doing. If you need to perform an action on that hook then go for it. If you’re creating a cron event and using that hook name, I would avoid it.

    Thread Starter egornmore

    (@egornmore)

    Got it, thanks for your time!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_ajax_ hooks’ is closed to new replies.