Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Form_Templates::get_legacy_option( string $field_id, string $location )

Retrieves legacy option’s value for a given field and location


Parameters Parameters

$field_id

(string) (Required) The field's identifier as found in the block schema list returned by LLMS_Form_Templates::get_reusable_block_schema().

$location

(string) (Required) Form location. Accepts "checkout", "registration", or "account".


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/forms/class-llms-form-templates.php

	private static function get_legacy_option( $field_id, $location ) {

		$name_map = array(
			'address' => 'address',
			'email'   => 'email_confirmation',
			'name'    => 'names',
			'phone'   => 'phone',
		);

		$val = '';

		if ( array_key_exists( $field_id, $name_map ) ) {

			$key = sprintf( 'lifterlms_user_info_field_%1$s_%2$s_visibility', $name_map[ $field_id ], $location );
			$val = get_option( $key );

		}

		return $val;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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