Commerce Recurring appends the ID to the label using the pattern "[label] #[ID]":

    return new FormattableMarkup('@title #@id', [
      '@title' => $this->getTitle(),
      '@id' => $this->id(),
    ]);

This module should do likewise in its License::label() function by appending the ID to the label built by the bundle plugin.

Comments

rszrama created an issue. See original summary.

rszrama’s picture

The only thing I'm a little cautious about here is that because there is a Title on Subscriptions, it's possible to get a "label" (i.e. the Title) of a Subscription without exposing an internal ID. If we need to preserve a label that doesn't have an internal ID, then perhaps we need to rethink this. However, right now, I don't see anywhere that a customer would ever be shown a license label and don't know a case where the ID being known would be unhelpful / undesired.

morbus iff’s picture

don't know a case where the ID being known would be unhelpful / undesired.

Admin-order editing. If an order admin edits an existing order, and adds a licensed order-item, none of the widgets make it easy to find the license you Just Created. An ID in the license title would help for string-matching. (Or, alternatively: adding an order edit to a past-creation/purchased order should automagically handle license creation.)

tomtech’s picture

Assigned: Unassigned » tomtech

  • TomTech authored 4a933b16 on 8.x-2.x
    Issue #3282335 by rszrama, Morbus Iff, TomTech: Append the license ID to...
tomtech’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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