| @@ 339-342 (lines=4) @@ | ||
| 336 | */ |
|
| 337 | public static function is_enabled_jetpack_recurring_payments() { |
|
| 338 | // For WPCOM sites. |
|
| 339 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM && function_exists( 'has_any_blog_stickers' ) ) { |
|
| 340 | $site_id = get_current_blog_id(); |
|
| 341 | return has_any_blog_stickers( array( 'personal-plan', 'premium-plan', 'business-plan', 'ecommerce-plan' ), $site_id ); |
|
| 342 | } |
|
| 343 | ||
| 344 | // For Jetpack sites. |
|
| 345 | return Jetpack::is_active() && ( |
|
| @@ 138-141 (lines=4) @@ | ||
| 135 | } |
|
| 136 | ||
| 137 | // For WPCOM sites |
|
| 138 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM && function_exists( 'has_any_blog_stickers' ) ) { |
|
| 139 | $site_id = $this->get_blog_id(); |
|
| 140 | return has_any_blog_stickers( array( 'premium-plan', 'business-plan', 'ecommerce-plan' ), $site_id ); |
|
| 141 | } |
|
| 142 | ||
| 143 | // For all Jetpack sites |
|
| 144 | return Jetpack::is_active() && Jetpack_Plan::supports( 'simple-payments'); |
|