Conditions | 4 |
Paths | 8 |
Total Lines | 18 |
Lines | 4 |
Ratio | 22.22 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
22 | public static function met_requirements() { |
||
23 | $errs = []; |
||
24 | |||
25 | if ( ! self::met_wp_cron_requirement() ) { |
||
26 | $errs[] = 'wp-cron'; |
||
27 | } |
||
28 | |||
29 | if ( ! self::met_filesystem_requirement() ) { |
||
30 | $errs[] = 'filesystem'; |
||
31 | } |
||
32 | |||
33 | View Code Duplication | if ( ! empty( $errs ) ) { |
|
34 | // translators: %s: Requirements unmet. |
||
35 | return new WP_Error( 'requirements_not_met', sprintf( __( 'Server requirements not met, missing requirement(s): %s.', 'woocommerce' ), implode( ', ', $errs ) ), array( 'status' => 400 ) ); |
||
36 | } |
||
37 | |||
38 | return true; |
||
39 | } |
||
40 | |||
61 |