Requirements::checkForRequirements()

Check if each requirement is satisfied

Description

Source

File: bp-integrations/learndash/core/Requirements.php

	public function checkForRequirements()
	{
		foreach ($this->requirements as $name => $data) {
			if (! call_user_func_array('call_user_func_array', $data['callback'])) {
				continue;
			}

			$this->checkedRequirements[] = $name;
		}

		$success = count($this->requirements) == count($this->checkedRequirements);
		do_action($success? 'bp_ld_sync/requirements_checked' : 'bp_ld_sync/requirements_failed', $this);
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.