Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello There,
In our case we need to track which user added a coupon.
For this we create a module where we are using form_alter_submit() hook. Below is the code used for same
function coupon_form_alter_submit(&$form, &$form_state){
// my code here
}
The above function is called after a coupon is created as I can see new coupon in listing.
We are facing issue to get the newly created coupon id in above function.
Can you please let us know that how we can get the newly created coupon id in form_alter_submit() function?
Thank you,
Pravin Sawant
Comments