diff --git a/docs/en/02_Customisation/01_Recipes/Custom_Checkout.md b/docs/en/02_Customisation/01_Recipes/Custom_Checkout.md index fa8f8ef0..54e0798a 100644 --- a/docs/en/02_Customisation/01_Recipes/Custom_Checkout.md +++ b/docs/en/02_Customisation/01_Recipes/Custom_Checkout.md @@ -29,7 +29,7 @@ class MyCustomCheckoutComponentConfig extends CheckoutComponentConfig { parent::__construct($order); $this->addComponent(CustomerDetailsCheckoutComponent::create()); - if (Checkout::member_creation_enabled() && !Member::currentUserID()) { + if (Checkout::member_creation_enabled() && !Security::getCurrentUser()) { $this->addComponent(MembershipCheckoutComponent::create()); } if (count(GatewayInfo::getSupportedGateways()) > 1) { diff --git a/docs/en/02_Customisation/01_Recipes/Multi_Step_Checkout.md b/docs/en/02_Customisation/01_Recipes/Multi_Step_Checkout.md index 7a3bbe06..377387f0 100644 --- a/docs/en/02_Customisation/01_Recipes/Multi_Step_Checkout.md +++ b/docs/en/02_Customisation/01_Recipes/Multi_Step_Checkout.md @@ -127,7 +127,7 @@ public function getData(Order $order) { return array( 'Organisation' => $order->Organisation, ... - if($member = Member::currentUser()){ + if($member = Security::getCurrentUser()){ return array( 'Organisation' => $member->Organisation, ... diff --git a/src/Tasks/PopulateCartTask.php b/src/Tasks/PopulateCartTask.php index 9e9426a5..30500e74 100644 --- a/src/Tasks/PopulateCartTask.php +++ b/src/Tasks/PopulateCartTask.php @@ -7,7 +7,7 @@ use SilverShop\Page\Product; use SilverStripe\Control\Controller; use SilverStripe\Dev\BuildTask; -use SilverStripe\Security\Member; +use SilverStripe\Security\Security; use SilverStripe\Versioned\Versioned; /** @@ -30,7 +30,7 @@ public function run($request) $product = $variations->sort('RAND()')->first(); } $quantity = (int)rand(1, 5); - if ($product->canPurchase(Member::currentUser(), $quantity)) { + if ($product->canPurchase(Security::getCurrentUser(), $quantity)) { $cart->add($product, $quantity); } }