Preliminary reading: How is the frontend header’s «Create an Account» link rendered?
Method 1 (recommended)
- Create a class which inherits from the
\Magento\Customer\Model\Url
.
- Override the
getRegisterUrl()
method -
Inject your class to the
\Magento\Customer\Block\Account\RegisterLink
's constructor as the$customerUrl
argument.
Method 2
Create an after
-plugin to the \Magento\Customer\Block\Account\RegisterLink::getHref()
method.