Skip to content

Free Store Checkup button in WooCommerce CTA (4.1.0) - #156

Merged
jasperf merged 4 commits into
mainfrom
feature/cta-woocommerce-checkup-button
Oct 5, 2026
Merged

jasperf merged 4 commits into
mainfrom
feature/cta-woocommerce-checkup-button

Conversation

@jasperf

@jasperf jasperf commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

This release, version 4.1.0, adds a third button, Run the Free Store Checkup, to the woocommerce variant of the imagewize/cta block. The button links to /woocommerce-checkup/ so that every WooCommerce blog post sends visitors and internal link value to the free checkup tool, which had only 9 scans in 90 days and 5 of those were internal tests. The button sits last in the list on purpose: the block uses templateLock: "contentOnly", and Gutenberg matches existing blocks to the template by position. Inserting a button in the middle would make old posts show the services link twice when opened in the editor. The release also adds @imwz/wp-pattern-sentinel as a dev dependency with a first fixture, and bumps the theme to 4.1.0 in all four required places.

CTA Block Changes:

  • resources/js/blocks/cta/templates.js: added ['Run the Free Store Checkup', '/woocommerce-checkup/'] as the last item in the woocommerce variant's buttons array. An inline comment explains why it has to stay last. The helper's docblock now says the first button is filled and every later button is outline, since a variant can now have more than two.
  • resources/js/blocks/cta/block.json: version bumped from 1.0.0 to 1.1.0 so the block's stylesheet gets a new ?ver= and browsers don't keep the year-long cached copy.
  • The woocommerce-de variant is unchanged because the checkup's on-page report is only in English.

Block Fixture Testing:

  • Added @imwz/wp-pattern-sentinel (^1.1.5) as a dev dependency, plus an npm run test:patterns script. The script sends the fixtures in tests/sentinel/ through the local editor via Trellis (--site=imagewize.com) and reports block-validation errors or content drift.
  • Added tests/sentinel/cta-woocommerce.html, the first fixture: the WooCommerce CTA as stored in post_content (taken from post 13755), with the new checkup button. .html fixtures need Sentinel 1.2.0 or later, while the declared range starts at 1.1.5.

Release and Deployment Notes:

  • The version is bumped to 4.1.0 in style.css (Version:) and readme.txt (Stable tag:), with matching entries in the readme.txt changelog (10/05/26) and CHANGELOG.md (2026-10-05).
  • Posts that are already published will not show the new button on the frontend until their stored markup is updated, because the saved HTML of a static block is what renders. To fix this on production, export the database first, then run a script that appends the button to every placed is-variant-woocommerce instance. Opening and saving a post in the editor also works, one post at a time.

Files Changed:

Dependency lock files updated: package-lock.json,

Sends visitors and internal link value from WooCommerce posts to /woocommerce-checkup/, which stored only 9 scans in 90 days. Appended last because contentOnly re-syncs placed instances to the template by position; mid-list it would duplicate the services link in existing posts.
Adds @imwz/wp-pattern-sentinel as a dev dependency with npm run test:patterns, and a fixture of the WooCommerce CTA as stored in post_content. The .html fixture needs Sentinel 1.2.0 (imagewize/wp-pattern-sentinel#24).
Sentinel 1.2.0 is now published. Its folder scan collects .html files, so
the cta-woocommerce.html fixture is actually picked up. With ^1.1.5 an
existing lock stayed on 1.1.5, which found no files and failed.
@jasperf
jasperf merged commit 4afb487 into main Oct 5, 2026
3 checks passed
@jasperf
jasperf deleted the feature/cta-woocommerce-checkup-button branch October 5, 2026 03:25
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.

1 participant