Legacy_Upgrades::maybe_upgrade_legacy_form_meta( int $form_id )

Upgrades legacy form metadata to new schema if necessary.

Description

See also

Parameters

$form_id

(int) (Required) ID of the form for which to migrate data.

Return

(bool) True if form metadata was migrated, false if it had already been migrated before.

Source

File: src/components/legacy-upgrades.php

	public function maybe_upgrade_legacy_form_meta( $form_id ) {
		if ( get_post_meta( $form_id, $this->get_prefix() . 'legacy_needs_migration', true ) !== 'true' ) {
			return false;
		}

		$this->upgrade_legacy_form_meta( $form_id );

		delete_post_meta( $form_id, $this->get_prefix() . 'legacy_needs_migration' );

		return true;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.