- Issue created by @kaszarobert
- Merge request !25Issue #3462662: Add possibility to attach PDF files to the e-mail β (Open) created by kaszarobert
- Status changed to Needs review
10 months ago 12:21pm 31 July 2024 - π«π·France steveoriol Grenoble π«π·
A get an error on "/admin/commerce/config/emails" page after add MR!25 :
ArgumentCountError: Too few arguments to function Drupal\commerce_email\EmailSender::__construct(), 4 passed in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261 and exactly 5 expected in Drupal\commerce_email\EmailSender->__construct() (line 77 of modules/contrib/commerce_email/src/EmailSender.php).
- π«π·France steveoriol Grenoble π«π·
By adding the create method inside the EmailSender class, this works:
public static function create(ContainerInterface $container) { return new static( $container->get('commerce_email.mail_handler'), $container->get('token'), $container->get('database'), $container->get('entity_type.manager'), $container->get('event_dispatcher') ); }
- π«π·France steveoriol Grenoble π«π·
In fact, this MR works really well, it's great.
Do you think it would be easy to modify to be able to select several files in the list, for example a pdf of the order and another from the store?