LLMS_Helper_Cloned::handle_clone()

Attempt to automatically activate already activated add-ons when cloning


Description Description

If the key cannot be activated all activation related data will be removed Called when LifterLMS core detects a cloned site.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: libraries/lifterlms-helper/includes/class-llms-helper-cloned.php

	public function handle_clone() {

		$keys = llms_helper_options()->get_license_keys();

		if ( ! $keys ) {
			return;
		}

		$res = LLMS_Helper_Keys::activate_keys( array_keys( $keys ) );

		if ( ! is_wp_error( $res ) ) {

			$data = $res['data'];
			if ( isset( $data['activations'] ) ) {
				foreach ( $data['activations'] as $activation ) {
					LLMS_Helper_Keys::add_license_key( $activation );
				}
			}
		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Unknown.
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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