| @@ 2430-2441 (lines=12) @@ | ||
| 2427 | return $interval; |
|
| 2428 | } |
|
| 2429 | ||
| 2430 | public function failing_subscription() { |
|
| 2431 | $args = array( |
|
| 2432 | 'status' => 'failing' |
|
| 2433 | ); |
|
| 2434 | ||
| 2435 | if ( $this->update_subscription( $args ) ) { |
|
| 2436 | do_action( 'wpinv_subscription_failing', $this->ID, $this ); |
|
| 2437 | return true; |
|
| 2438 | } |
|
| 2439 | ||
| 2440 | return false; |
|
| 2441 | } |
|
| 2442 | ||
| 2443 | public function stop_subscription() { |
|
| 2444 | $args = array( |
|
| @@ 2443-2454 (lines=12) @@ | ||
| 2440 | return false; |
|
| 2441 | } |
|
| 2442 | ||
| 2443 | public function stop_subscription() { |
|
| 2444 | $args = array( |
|
| 2445 | 'status' => 'stopped' |
|
| 2446 | ); |
|
| 2447 | ||
| 2448 | if ( $this->update_subscription( $args ) ) { |
|
| 2449 | do_action( 'wpinv_subscription_stopped', $this->ID, $this ); |
|
| 2450 | return true; |
|
| 2451 | } |
|
| 2452 | ||
| 2453 | return false; |
|
| 2454 | } |
|
| 2455 | ||
| 2456 | public function restart_subscription() { |
|
| 2457 | $args = array( |
|
| @@ 2456-2467 (lines=12) @@ | ||
| 2453 | return false; |
|
| 2454 | } |
|
| 2455 | ||
| 2456 | public function restart_subscription() { |
|
| 2457 | $args = array( |
|
| 2458 | 'status' => 'active' |
|
| 2459 | ); |
|
| 2460 | ||
| 2461 | if ( $this->update_subscription( $args ) ) { |
|
| 2462 | do_action( 'wpinv_subscription_restarted', $this->ID, $this ); |
|
| 2463 | return true; |
|
| 2464 | } |
|
| 2465 | ||
| 2466 | return false; |
|
| 2467 | } |
|
| 2468 | ||
| 2469 | public function cancel_subscription() { |
|
| 2470 | $args = array( |
|