LLMS_AJAX_Handler::delete_access_plan( array $request )

Move a Product Access Plan to the trash


Parameters Parameters

$request

(array) (Required) $_REQUEST object.


Top ↑

Return Return

(bool|WP_Error) WP_Error on error, true if successful.


Top ↑

Source Source

File: includes/class.llms.ajax.handler.php

	public static function delete_access_plan( $request ) {

		// shouldn't be possible.
		if ( empty( $request['plan_id'] ) ) {
			die();
		}

		if ( ! wp_trash_post( $request['plan_id'] ) ) {

			$err = new WP_Error();
			$err->add( 'error', __( 'There was a problem deleting your access plan, please try again.', 'lifterlms' ) );
			return $err;

		}

		return true;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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