public function AddressBook::needsCopy in Commerce Core 8.2
Checks if the profile needs to be copied to the customer's address book.
Parameters
\Drupal\profile\Entity\ProfileInterface $profile: The profile.
Return value
bool TRUE if the profile needs to be copied to the customer's address book, FALSE otherwise.
Overrides AddressBookInterface::needsCopy
File
- modules/
order/ src/ AddressBook.php, line 126
Class
Namespace
Drupal\commerce_orderCode
public function needsCopy(ProfileInterface $profile) {
return (bool) $profile
->getData('copy_to_address_book', FALSE);
}