From f0e7da779cc126f5cb2aa70dfc58ef4c0d5db27b Mon Sep 17 00:00:00 2001 From: Anna Heath Date: Thu, 17 Jul 2025 16:32:00 -0700 Subject: [PATCH] Entity property info fix and PHP 8.x compability fix Fixes #37 This commit incorporates some adjustments we made to address some entity property info issues where customer and product labels weren't rendering correctly. --- modules/customer/includes/commerce_customer.entity.inc | 3 +-- modules/product/includes/commerce_product.entity.inc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/customer/includes/commerce_customer.entity.inc b/modules/customer/includes/commerce_customer.entity.inc index 020f45c6..f358c6b6 100644 --- a/modules/customer/includes/commerce_customer.entity.inc +++ b/modules/customer/includes/commerce_customer.entity.inc @@ -6,7 +6,6 @@ class CommerceCustomerProfile extends Entity { public $langcode = LANGUAGE_NONE; - public $name = ''; public function __construct($values = array()) { parent::__construct($values, 'commerce_customer_profile'); @@ -21,7 +20,7 @@ class CommerceCustomerProfile extends Entity { } public function label() { - return $this->name; + return "Customer Profile (uid {$this->uid})"; } public function uri() { diff --git a/modules/product/includes/commerce_product.entity.inc b/modules/product/includes/commerce_product.entity.inc index 9f8f443a..5315e47d 100644 --- a/modules/product/includes/commerce_product.entity.inc +++ b/modules/product/includes/commerce_product.entity.inc @@ -20,7 +20,7 @@ class CommerceProduct extends Entity { } public function label() { - return $this->name; + return $this->title; } public function uri() {