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

Created on 4 February 2023, over 1 year 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.69.0 2024