Plugin errors at ShippingService->getLabel() is null.

Created on 4 February 2023, almost 2 years ago

Problem/Motivation

When creating a Shipping method using a custom plugin, an error occurs:

Path: /admin/commerce/shipping-methods/add?_wrapper_format=drupal_ajax&ajax_form=1
Message:
TypeError: Drupal\commerce_shipping\ShippingService::getLabel(): Return value must be of type string, null returned in Drupal\commerce_shipping\ShippingService->getLabel() (line 54 of /var/www/html/web/modules/contrib/commerce_shipping/src/ShippingService.php).

Proposed resolution

Add param 'rate_label' to the defaultConfiguration

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine abyss

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

Comments & Activities

Production build 0.71.5 2024