public function onFetchStatusSavePackagesOrder(string &$status, string &$comment) : void

Fires after evaluating the default status code.


Description

Trigger hook to manipulate the order status at runtime.


Parameters

&$status

(string)  The status code to use.

&$comment

(string)  An optional status comment.

Return Value

None.


Example

/**
 * Trigger hook to manipulate the order status at runtime.
 *
 * @param   string  &$status   The currently fetched order status.
 * @param   string  &$comment  An optional status comment to be used.
 *
 * @return  void
 */
public function onFetchStatusSavePackagesOrder(&$status, &$comment)
{
    // auto-confirm order
    $status = 'C';
    // define a custom comment
    $comment = 'Order confirmed by a third-party plugin';
}

Changelog

VersionDescription
1.7 Introduced.
Last Update: 2021-10-08 15:09
Helpful?