BOGO Select for WooCommerce 2.3.2
Install: download bogo-select-2.3.2.zip below, then WordPress → Plugins → Add New → Upload Plugin.
[2.3.2] — 2026-08-02
An analyser, and the twelve findings it was wrong about.
What is added is development tooling rather than plugin functionality, so this
is a PATCH: the runtime changes it prompted are casts and annotations, and every
offer behaves exactly as it did in 2.3.1.
Added
-
Static analysis, at a level the code actually passes (
CODEX-REVIEW.md
L-04, the half deferred from 2.3.1). PHPStan reads the runtime code against
the WordPress and WooCommerce stub packages and judges it as PHP 7.4, the
compatibility floor, while running on a current PHP.composer analyseruns
it and so does a CI job of its own. There is no baseline and nothing is
suppressed: a baseline records what the code got wrong and then stops
mentioning it, which turns the level into a number about history rather than
about the code.The first run reported 116 problems. Eighty were missing type annotations —
the level-6 rules, no defect among them, and the named next step. Of the rest:
seven passed an int toesc_attr(), six used plugin constants the analyser
cannot see because it does not rundefine(), three crossed float and string
on a price, and two calledget_variation_attributes()on aWC_Product,
where it does not exist. All are fixed; none changed behaviour.Twelve were reported as redundant guards and were kept. The stubs describe
current WooCommerce optimistically, so amethod_exists()check against an
older release reads as always true and is not — deleting those is how a
compatibility guard becomes a regression.treatPhpDocTypesAsCertain: false
stops docblock types being treated as certainties while leaving native types
alone, and the twelve findings went away without the code going with them.
Fixed
- The pinned-sibling browser assertion matches what WooCommerce renders.
Tightening it in 2.3.1 turned it red: it looked for the variation's full post
title,Classic Variable Thing - Large, in the cart line. WooCommerce renders
a variation line as the parent's name withSize: Largebeneath it, so that
string is never there. The 2.3.1 CI failure was this assertion, not the
plugin — and it also showed the assertion it replaced had been passing on a
negative that was true whichever sibling was in the cart. It now matches the
attribute, still scoped to the cart rows, and prints the row text when it
fails.