Skip to content

[PAR-848] Configurable Express Button Styles - #122

Merged
mescalantea merged 4 commits into
masterfrom
feature/PAR-848-Configurable-Express-Button-Styles
Aug 26, 2026
Merged

[PAR-848] Configurable Express Button Styles#122
mescalantea merged 4 commits into
masterfrom
feature/PAR-848-Configurable-Express-Button-Styles

Conversation

@mescalantea

@mescalantea mescalantea commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What is the goal?

Merchants can now style the express checkout button from the Merchant Portal. This module's part is to hand that configuration to the button on the product, cart and mini-cart pages.

References

How is it being implemented?

  • The availability check now returns the merchant's style alongside the render state, and the three button mounts emit it as a single data-button-style attribute, HTML-escaped.
  • The module never parses or validates it. One attribute rather than one per property is deliberate: per-property attributes would put this module back in the release path every time a style property is added. The rendered button does all sanitising.
  • No new call to the core package — the value rides the availability response the blocks already fetch, and is resolved only when a button will actually render.

Opportunistic refactorings

The two availability branches were merged; they differed only in which call they make and which state means unavailable.

Caveats

composer.json currently points at an unreleased branch of the core package and must go back to a tagged release before merge. The module degrades correctly against the released version — it emits no attribute — so the feature is inert until that bump.

Does it affect (changes or update) any sensitive data?

No. Presentation values only, escaped into an HTML attribute.

How is it tested?

No unit tests exist for these classes, so this was verified by reading each path against the previous behaviour and by the static gates: PHPCS and PHPStan level 9 clean, syntax checked from PHP 7.4 to 8.5. End-to-end verification against a real store is still outstanding.

How is it going to be deployed?

After the core release that carries the field, and after the CDN ships the button that renders it.

mescalantea and others added 3 commits August 19, 2026 16:41
… button

The blob is opaque here: only the portal that writes it and the button
that renders it know its attribute names, so this module forwards it
untouched and a new style property needs no release of this module or
any other plugin. The attribute is omitted rather than emitted empty, so
an unconfigured store takes the library's existing default path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both ended in the same tail once the style joined the result, and a
private helper existed only to absorb that duplication. The branches
differ in the core call and in which state means unavailable, so those
are all they now contain.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@m1k3lm m1k3lm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bear iin mind that it is pointing composer dependency needs to be fixed "sequra/integration-core": "dev-feature/PAR-848-Configurable-Express-Button-Styles",

@mescalantea
mescalantea merged commit 4c4985b into master Aug 26, 2026
4 checks passed
@mescalantea
mescalantea deleted the feature/PAR-848-Configurable-Express-Button-Styles branch August 26, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants