I need to programmatically update a product with drupal commerce.
Which hook can I use?
And how can I get the value of the variation? If for example I have a field in the product variation which is field_newvar?
(In drupal 7 I used
hook_node_presave($node) {
and then got the commerce product entity with entity_metadata_wrapper but now in drupal8 we don't need nodes to show products.)