LLMS_Order::can_resubscribe()
Determines if the order can be resubscribed to.
Return Return
(bool)
Source Source
File: includes/models/model.llms.order.php
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | public function can_resubscribe() { $can_resubscribe = false; if ( $this ->is_recurring() ) { /** * Filters the order statuses from which an order can be reactivated. * * @since 7.0.0 * * @param string[] $allowed_statuses The list of allowed order statuses. */ $allowed_statuses = apply_filters( 'llms_order_status_can_resubscribe_from' , array ( 'llms-on-hold' , 'llms-pending' , 'llms-pending-cancel' , ) ); $can_resubscribe = in_array( $this ->get( 'status' ), $allowed_statuses , true ); } /** * Determines whether or not a user can resubscribe to an inactive recurring payment order. * * @since 3.19.0 * * @param boolean $can_resubscribe Whether or not a user can resubscribe. * @param LLMS_Order $order The order object. */ return apply_filters( 'llms_order_can_resubscribe' , $can_resubscribe , $this ); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.2.0 | Use strict type comparison. |
3.19.0 | Introduced. |