v0.4.1
Square Terminal for WooCommerce 0.4.1
A correction to what 0.4.0 told you, and quieter logs while setting a Terminal up.
Fixed
The reader list said something untrue
Square's Devices API only reports Terminals that have been set up for Terminal API use. A Square Terminal running Square POS — the normal retail mode — is invisible to that API until it has been paired with a device code.
0.4.0's wording implied that Terminals paired by any means would appear under "Other Terminals on this Square account". They will not. An empty list before pairing is the expected state, not a fault, and the screen now says so.
There is no API that reveals a Terminal before it has been paired. Create Device Code, then entering that code on the Terminal, is the only route — not a workaround for a discovery problem.
Duplicate log entries during setup
WooCommerce builds the localized payment data several times per page render, so a single checkout render produced several identical discovery entries. Discovery is now resolved once per request, and the per-request result is discarded whenever the device cache is invalidated so a lookup made straight after pairing cannot answer from the pre-pairing list.
Upgrade notes
- No settings changes required.
- To make a Terminal selectable at checkout: Create Device Code, enter the code on the Terminal, then Check for readers. It should move into the paired list.
Verification status
- Observed:
composer lintclean,composer test180 tests / 661 assertions,composer test:js26/26. - Observed: the Devices API behaviour above is confirmed by Square's documentation and matches production logs from 0.4.0, where the account lookup succeeded and returned zero devices for an account with a Terminal that had not been paired.
- Not verified: a populated reader list. That requires a Terminal actually paired through this plugin.