• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Running Job class after add-on installation/upgrade

Jake B.

Well-known member
#1
I have a job (ThemeHouse\Reactions\Job\ConvertLikes) that I need to run after the add-on installs to prevent the additional manual step of converting likes into reactions. With the import classes you can specify jobs to run after it completes, is there anything similar for add-on installation?
 

Jake B.

Well-known member
#2
Found this in XFRM's installer. Going to give that a try
Code:
$this->app->jobManager()->enqueueUnique(
   'xfrmUpgradeUpdateEmbedMetadataRebuild',
   'XFRM:ResourceUpdateEmbedMetadata',
   ['types' => 'attachments'],
   false
);