Fix revspace_mqtt plugin after change to new api
This commit is contained in:
parent
9e5ac6eb06
commit
c7b66a1084
1 changed files with 2 additions and 2 deletions
|
@ -20,12 +20,12 @@ sub hook_checkout {
|
|||
$stats{ $_->attribute('product_id') } += $_->quantity for @entries;
|
||||
|
||||
for (@entries) {
|
||||
my $product = $_->{product_id};
|
||||
my $product = $_->attribute('product_id');
|
||||
|
||||
publish "revspace/bank/sale" => $product;
|
||||
next if $already_retained{ $product };
|
||||
|
||||
retain "revspace/bank/$product" => $stats{$_->{product_id}};
|
||||
retain "revspace/bank/$product" => $stats{$_->attribute('product_id')};
|
||||
$already_retained{ $product } = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue