Skip to content

Commit

Permalink
Merge pull request #4 from nanobiten/feature/add-filter-to-inventory-…
Browse files Browse the repository at this point in the history
…attribute

Add filter to make it possible to choose own way to fetch attribute
  • Loading branch information
vilgro authored Jul 8, 2020
2 parents f0c72db + f6dfcf4 commit 908130b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Trustpilot/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ function trustpilot_get_inventory_attribute($attr, $product, $useDbAttribute = t
return $value ? $value : '';
default:
$value = $product->get_attribute($attr_field);
$value = apply_filters( 'trustpilot_inventory_attribute_value', $value, $attr_field, $product );
return $value ? $value : '';
}
}

0 comments on commit 908130b

Please sign in to comment.