sequra_platform_options

Hook Filter

Filter the platform options.

Description

This filter allows modifying the the platform object to be used to build the the platform attribute present in the Order, OrderUpdate and DeliveryReport API calls payload.

ParameterTypeDescription
$platform\SeQura\Core\BusinessLogic\Domain\Order\Models\OrderRequest\PlatformPlatform instance

Changelog

VersionDescription
3.0.0Introduced

Usage Example

add_filter('sequra_platform_options', function($platform){
  return new \SeQura\Core\BusinessLogic\Domain\Order\Models\OrderRequest\Platform(
    $platform->getName(),
    $platform->getVersion(),
    $platform->getUname(),
    $platform->getDbName(),
    $platform->getDbVersion(),
    $platform->getPluginVersion(),
    $platform->getPhpVersion()
  );
});