do_action( "wpcd_command_{$this->get_app_name()}_completed_after_cleanup", $id, $app_id, $name, $base_command )
This is a variable action hook whose name changes based on the status of the command being run. See discussion below for more information.
add_action( "wpcd_command_wordpress-app_completed_after_cleanup", 'my_function', 10, 4 ); public function my_function( $id, $app_id, $name, $base_command ) { //your code here }
This hook is fired after any long-running command is completed and after metas in the associated app records have been removed. Long running commands are actions like deploying servers and websites (the ones that usually include the black ‘terminal’ screen.)
The name of the hook depends on the app name being run. For WordPress actions, the app name will always be wordpress-app.
Unless you want to run an action after every single long-running command, you should check the $name or $base_command variable and base your code on the result of that check.
If you are looking to perform actions after a WordPress site is deployed, this is likely the hook you need.
Located in:
This hook is used in our SELL WP SITE SUBSCRIPTIONS WITH WOOCOMMERCE add-on to install SSL after a site is deployed.
This hook is only available in WPCD versions 4.2.5 or later.