| @@ 2397-2408 (lines=12) @@ | ||
| 2394 | return $interval; |
|
| 2395 | } |
|
| 2396 | ||
| 2397 | public function failing_subscription() { |
|
| 2398 | $args = array( |
|
| 2399 | 'status' => 'failing' |
|
| 2400 | ); |
|
| 2401 | ||
| 2402 | if ( $this->update_subscription( $args ) ) { |
|
| 2403 | do_action( 'wpinv_subscription_failing', $this->ID, $this ); |
|
| 2404 | return true; |
|
| 2405 | } |
|
| 2406 | ||
| 2407 | return false; |
|
| 2408 | } |
|
| 2409 | ||
| 2410 | public function stop_subscription() { |
|
| 2411 | $args = array( |
|
| @@ 2410-2421 (lines=12) @@ | ||
| 2407 | return false; |
|
| 2408 | } |
|
| 2409 | ||
| 2410 | public function stop_subscription() { |
|
| 2411 | $args = array( |
|
| 2412 | 'status' => 'stopped' |
|
| 2413 | ); |
|
| 2414 | ||
| 2415 | if ( $this->update_subscription( $args ) ) { |
|
| 2416 | do_action( 'wpinv_subscription_stopped', $this->ID, $this ); |
|
| 2417 | return true; |
|
| 2418 | } |
|
| 2419 | ||
| 2420 | return false; |
|
| 2421 | } |
|
| 2422 | ||
| 2423 | public function restart_subscription() { |
|
| 2424 | $args = array( |
|
| @@ 2423-2434 (lines=12) @@ | ||
| 2420 | return false; |
|
| 2421 | } |
|
| 2422 | ||
| 2423 | public function restart_subscription() { |
|
| 2424 | $args = array( |
|
| 2425 | 'status' => 'active' |
|
| 2426 | ); |
|
| 2427 | ||
| 2428 | if ( $this->update_subscription( $args ) ) { |
|
| 2429 | do_action( 'wpinv_subscription_restarted', $this->ID, $this ); |
|
| 2430 | return true; |
|
| 2431 | } |
|
| 2432 | ||
| 2433 | return false; |
|
| 2434 | } |
|
| 2435 | ||
| 2436 | public function cancel_subscription() { |
|
| 2437 | $args = array( |
|