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