🐛 | Drupal core | Remove all occurences of sourceMappingURL and sourceURL when JS files are aggregated
🇵🇹Portugal filipetakanap
ye, i still have this error for a long time even after updates... D9
🇵🇹Portugal filipetakanap
filipetakanap → created an issue.
🇵🇹Portugal filipetakanap
I'm still having issues... Think the easiest way would be something like this in invoice.php
$orderA = $this->get('orders')->first()->entity->getState();
if ($this->getState()->getId() == 'pending' && $orderA == "payment_accepted") {
/** @var \Drupal\commerce_number_pattern\Entity\NumberPatternInterface $number_pattern */
$number_pattern = $invoice_type->getNumberPattern();
if ($number_pattern) {
$invoice_number = $number_pattern->getPlugin()->generate($this);
$this->setInvoiceNumber($invoice_number);
}
}
I'm trying to get the order state "payment accepted" to generate a new invoice with a number.
But i don't know the code to get the order state
🇵🇹Portugal filipetakanap
filipetakanap → created an issue.