File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/code/Magento/Shipping/Model Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ public function collectRates(\Magento\Quote\Model\Quote\Address\RateRequest $req
273
273
*/
274
274
private function prepareCarrier (string $ carrierCode , RateRequest $ request ): AbstractCarrier
275
275
{
276
- $ carrier = $ this ->isShippingCarrierAvailable ($ carrierCode )
276
+ $ carrier = $ this ->isShippingCarrierAvailable ($ carrierCode, $ request -> getStoreId () )
277
277
? $ this ->_carrierFactory ->create ($ carrierCode , $ request ->getStoreId ())
278
278
: null ;
279
279
if (!$ carrier ) {
@@ -541,13 +541,15 @@ public function setCarrierAvailabilityConfigField($code = 'active')
541
541
* Checks availability of carrier.
542
542
*
543
543
* @param string $carrierCode
544
+ * @param null|int $storeId
544
545
* @return bool
545
546
*/
546
- private function isShippingCarrierAvailable (string $ carrierCode ): bool
547
+ private function isShippingCarrierAvailable (string $ carrierCode, ? int $ storeId = null ): bool
547
548
{
548
549
return $ this ->_scopeConfig ->isSetFlag (
549
550
'carriers/ ' . $ carrierCode . '/ ' . $ this ->_availabilityConfigField ,
550
- \Magento \Store \Model \ScopeInterface::SCOPE_STORE
551
+ \Magento \Store \Model \ScopeInterface::SCOPE_STORE ,
552
+ $ storeId
551
553
);
552
554
}
553
555
}
You can’t perform that action at this time.
0 commit comments