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

	/**
	 * Move a Product Access Plan to the trash
	 *
	 * @since 3.0.0
	 *
	 * @param array $request $_REQUEST object.
	 * @return bool|WP_Error WP_Error on error, true if successful.
	 */
	public static function delete_access_plan( $request ) {

		if ( empty( $request['plan_id'] ) ) {
			wp_die();
		}

		$access_plan = llms_get_post( $request['plan_id'] );
		if ( ! $access_plan->get( 'product_id' ) ) {
			wp_die();

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.