Your cart is empty!
Before Redirect
public function onRedirectPackagesOrder(string &$url, int $order) : void
Fires before redirecting the user to the summary landing page.
Description
Trigger hook to manipulate the redirect URL after completing the ordering process of the packages.
This is the last triggered hook during the ordering process. It is possible to use it for any kind of procedures to be applied after registering the packages, such as to send custom notifications.
Parameters
- &$url
-
(string) The URL to reach after completing the ordering process.
- $order
-
(int) The ID of the newly saved order.
Return Value
None.
Example
/**
* Trigger hook to manipulate the redirect URL after completing
* the packages purchase process.
*
* @param string &$url The redirect URL (plain).
* @param integer $order The order id.
*
* @return void
*/
public function onRedirectPackagesOrder(&$url, $order)
{
// access the order details, if needed
$order = VAPOrderFactory::getPackages($order);
// it is possible to overwrite the landing page after ordering a package
$url = 'index.php';
}
Changelog
Version | Description |
---|---|
1.7 | Introduced. |
Last Update: 2021-10-08 15:11
Helpful?