File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -889,6 +889,15 @@ public function afterSave(bool $isNew): void
889889 $ record ->defaultWidth = $ defaultVariant ->width ?? 0 ;
890890 $ record ->defaultWeight = $ defaultVariant ->weight ?? 0 ;
891891
892+ // Make sure to update the object
893+ $ this ->defaultVariantId = $ defaultVariant ->id ?? null ;
894+ $ this ->defaultSku = $ defaultVariant ->skuAsText ?? '' ;
895+ $ this ->defaultPrice = $ defaultVariant ->price ?? 0.0 ;
896+ $ this ->defaultHeight = $ defaultVariant ->height ?? 0 ;
897+ $ this ->defaultLength = $ defaultVariant ->length ?? 0 ;
898+ $ this ->defaultWidth = $ defaultVariant ->width ?? 0 ;
899+ $ this ->defaultWeight = $ defaultVariant ->weight ?? 0 ;
900+
892901 // We want to always have the same date as the element table, based on the logic for updating these in the element service i.e resaving
893902 $ record ->dateUpdated = $ this ->dateUpdated ;
894903 $ record ->dateCreated = $ this ->dateCreated ;
You can’t perform that action at this time.
0 commit comments