Skip to content

Instantly share code, notes, and snippets.

@nickrouty
Created December 12, 2017 04:07
Show Gist options
  • Save nickrouty/f8eaa1549617f568ab2dd97659c080bd to your computer and use it in GitHub Desktop.
Save nickrouty/f8eaa1549617f568ab2dd97659c080bd to your computer and use it in GitHub Desktop.
Filter/Customize the Order number for Chase Paymentech WooCommerce XML API Gateway by Routy Development to append the last 4 numbers of the WooCommerce Order ID.
function rd_set_custom_order_id_for_chase_paymentech( $order_id, $order ) {
return uniqid() . '-' . substr($order->get_id(), -4);
}
add_filter( 'chase_paymentech_gateway_transaction_order_id', 'rd_set_custom_order_id_for_chase_paymentech', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment