Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Fix version_compare numbers so they match 5.2.x versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Jun 26, 2020
1 parent f61fcc9 commit e0dc45e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Assets/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function register_style( $handle, $relative_src, $deps = [], $media = 'al
*/
public function get_block_asset_build_path( $filename, $type = 'js' ) {
global $wp_version;
$suffix = version_compare( $wp_version, '5.2', '>' )
$suffix = version_compare( $wp_version, '5.3', '>=' )
? ''
: '-legacy';
return "build/$filename$suffix.$type";
Expand Down
2 changes: 1 addition & 1 deletion src/Library.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function register_blocks() {
];
// Note: as a part of refactoring dynamic block registration, this will be moved
// to block level config.
if ( version_compare( $wp_version, '5.2', '>' ) ) {
if ( version_compare( $wp_version, '5.3', '>=' ) ) {
$blocks[] = 'AllProducts';
$blocks[] = 'PriceFilter';
$blocks[] = 'AttributeFilter';
Expand Down

0 comments on commit e0dc45e

Please sign in to comment.