LLMS_Controller_Awards::on_rest_insert_merge_data( array $merge_data )
Modifies the merge data used when awarded a certificate using the REST API.
Description Description
This removes the {sequential_id}
merge data. When creating the draft we don’t want to use the default 1
or whatever the parent’s ID is. If we use 1
that’s just generally incorrect and if we use the parent’s ID it might become the wrong ID by the time the certificate is published / awarded.
Removing this will not merge the ID but on awarding the ID will be automatically merged with other merge codes.
Parameters Parameters
- $merge_data
-
(array) (Required) Merge data.
Return Return
(array)
Source Source
File: includes/controllers/class-llms-controller-awards.php
public static function on_rest_insert_merge_data( $merge_data ) { unset( $merge_data['{sequential_id}'] ); return $merge_data; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |