Find webform submission ID in a custom submission handler I have created a webform custom submission handler.

public function submitForm(array &amp;$form, FormStateInterface $form_state,  WebformSubmissionInterface $webform_submission) {
  $webform_submission-&gt;getDate();
}


I am getting all the submitted values except the submission id. How do I get that value?
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();