Problem/Motivation

Hi! I've noticed when using the module, the shipping method plugin applies() method is ignored.

Steps to reproduce

Add custom shipping method plugin or use shipping plugin with not empty logic in the 'applies' method.
Create shipping method and use the plugin.
Test if applies method from the plugin is executed.

Proposed resolution

Use similar condition from Drupal\commerce_shipping\Entity\ShippingMethod::applies() in Drupal\commerce_conditions_plus\Entity\ShippingMethod::applies():

   if ($this->getPlugin() && !$this->getPlugin()->applies($shipment)) {
      return FALSE;
    }

Remaining tasks

User interface changes

API changes

Data model changes

Comments

khiminrm created an issue. See original summary.

khiminrm’s picture

khiminrm’s picture

Status: Active » Needs review

  • jsacksick committed 130214b5 on 1.0.x
    fix: #3523626 Shipping method plugin's applies() is ignored
    
    By:...

  • jsacksick committed f8345bf6 on 2.0.x
    fix: #3523626 Shipping method plugin's applies() is ignored
    
    By:...
jsacksick’s picture

Status: Needs review » Fixed

Committed, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.