diff --git a/modules/product/src/Entity/ProductVariation.php b/modules/product/src/Entity/ProductVariation.php
index c6fe382..43dcea0 100644
--- a/modules/product/src/Entity/ProductVariation.php
+++ b/modules/product/src/Entity/ProductVariation.php
@@ -184,7 +184,7 @@ class ProductVariation extends ContentEntityBase implements ProductVariationInte
    */
   public function getLineItemType() {
     // The line item type is a bundle-level setting.
-    $type_storage = $this->entityManager()->getStorage('commerce_product_variation_type');
+    $type_storage = $this->entityTypeManager()->getStorage('commerce_product_variation_type');
     $type_entity = $type_storage->load($this->bundle());
 
     return $type_entity->getLineItemType();
diff --git a/src/Tests/EntitySelectWidgetTest.php b/src/Tests/EntitySelectWidgetTest.php
index 1c1f64d..84a68c7 100644
--- a/src/Tests/EntitySelectWidgetTest.php
+++ b/src/Tests/EntitySelectWidgetTest.php
@@ -106,7 +106,7 @@ class EntitySelectWidgetTest extends CommerceTestBase {
     $edit['stores[target_id][value][' . $store_ids[1] .']'] = FALSE;
     $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
     $this->assertResponse(200);
-    \Drupal::entityManager()->getStorage('commerce_product')->resetCache();
+    \Drupal::entityTypeManager()->getStorage('commerce_product')->resetCache();
     $this->product = Product::load($this->product->id());
     $this->assertFieldValues($this->product->getStoreIds(), [$store_ids[0]], 'The correct store has been set on the product.');
     $this->drupalGet($form_url);
@@ -134,7 +134,7 @@ class EntitySelectWidgetTest extends CommerceTestBase {
     $edit['stores[target_id][value]'] = $store_labels[0] . ', ' . $store_labels[1];
     $this->drupalPostForm(NULL, $edit, t('Save and keep published'));
     $this->assertResponse(200);
-    \Drupal::entityManager()->getStorage('commerce_product')->resetCache();
+    \Drupal::entityTypeManager()->getStorage('commerce_product')->resetCache();
     $this->product = Product::load($this->product->id());
     $this->assertFieldValues($this->product->getStoreIds(), [$store_ids[0], $store_ids[1]], 'The correct stores have been set on the product.');
     $this->drupalGet($form_url);
