LLMS_AJAX_Handler::delete_access_plan( array $request )
Move a Product Access Plan to the trash
Parameters Parameters
- $request
-
(array) (Required) $_REQUEST object.
Return Return
(bool|WP_Error) WP_Error on error, true if successful.
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |