Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Utils_Upgrades::has_completed_upgrade( string $upgrade_id = '' )

Check if the upgrade routine has been run for a specific action


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Parameters Parameters

$upgrade_id

(Optional) The upgrade action to check completion for

Default value: ''


Top ↑

Return Return

(bool) If the action has been added to the completed actions array


Top ↑

Source Source

File: classes/Utils/Upgrades.php

	public function has_completed_upgrade( $upgrade_id = '' ) {
		if ( empty( $upgrade_id ) ) {
			return false;
		}

		$completed_upgrades = $this->get_completed_upgrades();

		return in_array( $upgrade_id, $completed_upgrades, true );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.