includes/class-freemius.php
static function add_ajax_action_static(
            $tag,
            $function_to_add,
            $priority = WP_FS__DEFAULT_PRIORITY,
            $module_id = null
        ) {
            self::$_static_logger->entrance( $tag );

            if ( ! self::is_ajax_action_static( $tag, $module_id ) ) {
                return false;
            }

            add_action(
                'wp_ajax_' . self::get_ajax_action_static( $tag, $module_id ),
                $function_to_add,
                $priority,
                0
            );

            self::$_static_logger->info( "$tag AJAX callback action added." );

            return true;
        }
static function add_ajax_action_static(
            $tag,
            $function_to_add,
            $priority = WP_FS__DEFAULT_PRIORITY,
            $module_id = null
        ) {
            self::$_static_logger->entrance( $tag );

            if ( ! self::is_ajax_action_static( $tag, $module_id ) ) {
                return false;
            }

            add_action(
                'wp_ajax_' . self::get_ajax_action_static( $tag, $module_id ),
                $function_to_add,
                $priority,
                0
            );

            self::$_static_logger->info( "$tag AJAX callback action added." );

            return true;
        }
static function add_ajax_action_static ( $ tag , $ function_to_add , $ priority = WP_FS__DEFAULT_PRIORITY , $ module_id = null ) { self :: $ _static_logger -> entrance ( $ tag ) ; if ( ! self :: is_ajax_action_static ( $ tag , $ module_id ) ) { return false ; } add_action ( 'wp_ajax_' . self :: get_ajax_action_static ( $ tag , $ module_id ) , $ function_to_add , $ priority , 0 ) ; self :: $ _static_logger -> info ( "$tag AJAX callback action added." ) ; return true ; }
Add AJAX action.

@author Vova Feldman (@svovaf)
@since  1.2.1.6

@param string      $tag
@param callable    $function_to_add
@param int         $priority
@param number|null $module_id

@return bool True if action added, false if no need to add the action since the AJAX call isn't matching.
@uses   add_action()
Add AJAX action .