Skip to content

Commit

Permalink
fix: ProductAttributeEnum given default value, if no product attribut…
Browse files Browse the repository at this point in the history
…es exist (#814)

* fix: ProductAttributeEnum no longer registered if no attribute exist

* fix: ProductAttributeEnum default value provided
  • Loading branch information
kidunot89 authored Nov 1, 2023
1 parent 63a2727 commit 228284d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/type/enum/class-product-attribute-enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public static function register() {
}
}

if ( empty( $taxonomy_values ) ) {
$taxonomy_values['NONE'] = [ 'value' => 'none' ];
}

register_graphql_enum_type(
'ProductAttributeEnum',
[
Expand Down

0 comments on commit 228284d

Please sign in to comment.