New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoice Number preg_replace() adjustment..?? #467

angelleye opened this Issue May 18, 2016 · 0 comments


None yet
2 participants

angelleye commented May 18, 2016

A user is reporting that they are using a custom order ID plugin with WooCommerce that generates invoice IDs like this: 0518A1

For some reason, though, the A is getting stripped and the value sent to PayPal is 05181.

Looking at our Express Checkout class I see that we're doing the following with the $invoice_number:

$invoice_number = preg_replace("/[^0-9,.]/", "", $order->get_order_number());

I'm not sure why we're doing that, but it seems that this could be why the A is getting stripped from the value..??

We need to fix this issue, and also check the other gateways to ensure we aren't doing the same thing (ie. DDP, PayFlow, REST, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment