Skip to content

Commit

Permalink
Use two letter version numbers for version compare.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Aug 3, 2022
1 parent 33a4398 commit 0d61a5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions distributor.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ function( $class ) {
function() {
global $wp_version;
if (
version_compare( $wp_version, '5.7.0', '<' ) &&
version_compare( PHP_VERSION, '7.4.0', '<' )
version_compare( $wp_version, '5.7', '<' ) &&
version_compare( PHP_VERSION, '7.4', '<' )
) {
wp_die(
esc_html__( 'Distributor requires PHP version 7.4 or later and WordPress version 5.7 or later.', 'distributor' ),
esc_html__( 'Error Activating', 'distributor' )
);

} elseif ( version_compare( $wp_version, '5.7.0', '<' ) ) {
} elseif ( version_compare( $wp_version, '5.7', '<' ) ) {
wp_die(
esc_html__( 'Distributor requires WordPress version 5.7 or later.', 'distributor' ),
esc_html__( 'Error Activating', 'distributor' )
);
} elseif ( version_compare( PHP_VERSION, '7.4.0', '<' ) ) {
} elseif ( version_compare( PHP_VERSION, '7.4', '<' ) ) {
wp_die(
esc_html__( 'Distributor requires PHP version 7.4 or later.', 'distributor' ),
esc_html__( 'Error Activating', 'distributor' )
Expand Down

0 comments on commit 0d61a5f

Please sign in to comment.