| @@ 2418-2429 (lines=12) @@ | ||
| 2415 | return $interval; |
|
| 2416 | } |
|
| 2417 | ||
| 2418 | public function failing_subscription() { |
|
| 2419 | $args = array( |
|
| 2420 | 'status' => 'failing' |
|
| 2421 | ); |
|
| 2422 | ||
| 2423 | if ( $this->update_subscription( $args ) ) { |
|
| 2424 | do_action( 'wpinv_subscription_failing', $this->ID, $this ); |
|
| 2425 | return true; |
|
| 2426 | } |
|
| 2427 | ||
| 2428 | return false; |
|
| 2429 | } |
|
| 2430 | ||
| 2431 | public function stop_subscription() { |
|
| 2432 | $args = array( |
|
| @@ 2431-2442 (lines=12) @@ | ||
| 2428 | return false; |
|
| 2429 | } |
|
| 2430 | ||
| 2431 | public function stop_subscription() { |
|
| 2432 | $args = array( |
|
| 2433 | 'status' => 'stopped' |
|
| 2434 | ); |
|
| 2435 | ||
| 2436 | if ( $this->update_subscription( $args ) ) { |
|
| 2437 | do_action( 'wpinv_subscription_stopped', $this->ID, $this ); |
|
| 2438 | return true; |
|
| 2439 | } |
|
| 2440 | ||
| 2441 | return false; |
|
| 2442 | } |
|
| 2443 | ||
| 2444 | public function restart_subscription() { |
|
| 2445 | $args = array( |
|
| @@ 2444-2455 (lines=12) @@ | ||
| 2441 | return false; |
|
| 2442 | } |
|
| 2443 | ||
| 2444 | public function restart_subscription() { |
|
| 2445 | $args = array( |
|
| 2446 | 'status' => 'active' |
|
| 2447 | ); |
|
| 2448 | ||
| 2449 | if ( $this->update_subscription( $args ) ) { |
|
| 2450 | do_action( 'wpinv_subscription_restarted', $this->ID, $this ); |
|
| 2451 | return true; |
|
| 2452 | } |
|
| 2453 | ||
| 2454 | return false; |
|
| 2455 | } |
|
| 2456 | ||
| 2457 | public function cancel_subscription() { |
|
| 2458 | $args = array( |
|