Shipping method plugin's applies() is ignored

Created on 9 May 2025, about 2 months ago

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

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine khiminrm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024