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.


Top ↑

Parameters Parameters

$merge_data

(array) (Required) Merge data.


Top ↑

Return Return

(array)


Top ↑

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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.