Find webform submission ID in a custom submission handler
I have been able to get the submission ID in a custom submission handler using the following code.
$webform_submission-&gt;setSticky(!$webform_submission-&gt;isSticky())-&gt;save();
$sid = $webform_submission-&gt;id();