woocommerce_sequra_get_order_ref_1

Hook Filter

Filter the order ref 1.

Description

This filter allows modifying the order_ref_1 to be used to build the merchant reference payload attribute for the Order, OrderUpdate and DeliveryReport API calls. This can be used when the original Order ID is being changed with a custom value. For example, an active plugin that generates a custom sequence of characters to match the merchant's billing reference format.

ParameterTypeDescription
$ref_1int stringActual ref 1 value, usually the WooCommerce order ID
$orderWC_OrderThe order

Changelog

VersionDescription
2.0.0Introduced

Usage Example

add_filter('woocommerce_sequra_get_order_ref_1', function($ref_1, $order){
  $ref_1 = '#AAA-00001'; // Your custom order id for the order.
  return $ref_1;
}, 10, 2);