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