Skip to content

Commit

Permalink
11.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jun 2, 2024
1 parent f581b7f commit 4854c72
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
10 changes: 1 addition & 9 deletions Newsletter/lib/subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,7 @@ function df_subscriber($v = null, $w = null):S {
return !$v ? $r : (
df_is_email($v) ? $r->loadBySubscriberEmail($v, df_website_id($w)) : (
$v instanceof C ? $r->loadByCustomer(df_customer_id($v), $v->getWebsiteId()) : (
/**
* 2024-06-02
* 1.1) @uses \Magento\Quote\Model\Quote::getCustomerEmail()
* 1.2) @uses \Magento\Sales\Api\Data\OrderInterface::getCustomerEmail()
* 1.3) @uses \Magento\Sales\Model\Order::getCustomerEmail()
* 1.4) @see \Magento\Quote\Api\Data\CartInterface does not have a method or a field for the customer's email.
* 2) The customer's email can be absent in a quote.
*/
df_is_oq($v) ? $r->loadBySubscriberEmail($v->getCustomerEmail(), df_website_id($v)) :
df_is_oq($v) ? $r->loadBySubscriberEmail(df_oq_email($v), df_website_id($v)) :
df_error(['v' => $v])
)
)
Expand Down
14 changes: 14 additions & 0 deletions OQ/lib/oq/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
use Df\Core\Exception as DFE;
use Df\Quote\Model\Quote as DfQ;
use Magento\Customer\Model\Customer as C;
use Magento\Quote\Api\Data\CartInterface as IQ;
use Magento\Quote\Model\Quote as Q;
use Magento\Quote\Model\Quote\Address as QA;
use Magento\Sales\Api\Data\OrderInterface as IO;
use Magento\Sales\Model\Order as O;
use Magento\Sales\Model\Order\Address as OA;

Expand Down Expand Up @@ -67,6 +69,18 @@ function df_oq_customer_name($oq):string {return dfcf(function($oq) {
return $r ?: (df_is_o($oq) ? $oq->getCustomerName() : (string)__('Guest'));
}, [$oq]);}

/**
* 2024-06-02
* 1.1) @uses \Magento\Quote\Model\Quote::getCustomerEmail()
* 1.2) @uses \Magento\Sales\Api\Data\OrderInterface::getCustomerEmail()
* 1.3) @uses \Magento\Sales\Model\Order::getCustomerEmail()
* 1.4) @see \Magento\Quote\Api\Data\CartInterface does not have a method or a field for the customer's email.
* 2) The customer's email can be absent in a quote.
* @used-by df_subscriber()
* @param O|IO|Q|IQ $oq
*/
function df_oq_email($oq):?string {return $oq->getCustomerEmail();}

/**
* 2018-11-14
* @used-by \Df\Payment\Metadata::vars()
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/core"
,"version": "11.0.9"
,"version": "11.1.0"
,"description": "Mage2.PRO core package."
,"type": "magento2-module"
,"homepage": "https://mage2.pro"
Expand Down

0 comments on commit 4854c72

Please sign in to comment.