Skip to content

fix: add the saas onboarding pattern to the shop, checkout and order received - #20

Open
YvesCesar wants to merge 2 commits into
test/e2e-playwrightfrom
fix/saas-onboarding-pattern
Open

YvesCesar wants to merge 2 commits into
test/e2e-playwrightfrom
fix/saas-onboarding-pattern

Conversation

@YvesCesar

@YvesCesar YvesCesar commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Closes #19.

The libresign/saas-onboarding pattern was referenced but never registered, so nothing was rendered on the shop, checkout and order received pages.

  • Adds patterns/saas-onboarding.php: a heading and three steps (choose a plan, create your workspace, start signing). Strings are in English under the libresign text domain, so they reach Weblate through the usual .pot update.
  • Calls the pattern from the archive-product and page-checkout templates, as order-confirmation already did.
  • Removes the prepend from the the_content filter in inc/account.php. On the shop it never ran, since archive-product has no post-content block, and on the order received page the template already rendered the pattern. The function now only handles the account page, so it is renamed to libresign_theme_render_account_content.
  • Hides the onboarding when paying an existing order (order-pay) and when the received order is a renewal, switch or resubscribe of an existing subscription (inc/onboarding.php), since that customer already has a workspace.
  • Loads WooCommerce Subscriptions in the integration harness (same package as woocommerce-restrict-switch) to cover those orders.
  • Integration test renders the three templates and checks the onboarding appears once in each.
  • E2E test checks the onboarding on the real shop, checkout and order received pages, and its absence on a product page.

After deploy, the archive-product template saved in the database through the Site Editor overrides the theme file. Clearing its customizations (as listed in #13) is needed for the shop to show the onboarding.

…received

Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
@YvesCesar
YvesCesar marked this pull request as draft October 2, 2026 15:51
…ing an order of an existing subscription

Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
@YvesCesar
YvesCesar marked this pull request as ready for review October 2, 2026 16:06
@YvesCesar
YvesCesar requested a review from vitormattos October 2, 2026 16:11
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