Repository navigation
Free Store Checkup button in WooCommerce CTA (4.1.0) - #156
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This release, version 4.1.0, adds a third button, Run the Free Store Checkup, to the
woocommercevariant of theimagewize/ctablock. 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 usestemplateLock: "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-sentinelas 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 thewoocommercevariant'sbuttonsarray. 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:versionbumped from1.0.0to1.1.0so the block's stylesheet gets a new?ver=and browsers don't keep the year-long cached copy.woocommerce-devariant is unchanged because the checkup's on-page report is only in English.Block Fixture Testing:
@imwz/wp-pattern-sentinel(^1.1.5) as a dev dependency, plus annpm run test:patternsscript. The script sends the fixtures intests/sentinel/through the local editor via Trellis (--site=imagewize.com) and reports block-validation errors or content drift.tests/sentinel/cta-woocommerce.html, the first fixture: the WooCommerce CTA as stored inpost_content(taken from post 13755), with the new checkup button..htmlfixtures need Sentinel 1.2.0 or later, while the declared range starts at 1.1.5.Release and Deployment Notes:
style.css(Version:) andreadme.txt(Stable tag:), with matching entries in thereadme.txtchangelog (10/05/26) andCHANGELOG.md(2026-10-05).is-variant-woocommerceinstance. Opening and saving a post in the editor also works, one post at a time.Files Changed:
CHANGELOG.md(Modified)package.json(Modified)readme.txt(Modified)resources/js/blocks/cta/block.json(Modified)resources/js/blocks/cta/templates.js(Modified)style.css(Modified)tests/sentinel/cta-woocommerce.html(Added)Dependency lock files updated: package-lock.json,