Resolving WooCommerce Staging Site Warnings: A Developer's Guide to Cart, Checkout, and Webhook Issues

Maintaining a healthy WooCommerce staging environment is crucial for testing updates, new features, and design changes without impacting your live store. However, it's not uncommon to encounter discrepancies between your staging and production sites, often manifesting as warning notices. A recent query in the WooCommerce support forum highlights several common issues that can arise on a staging site, specifically related to core WooCommerce pages, payment gateway connections, and webhook configurations.

The user, facing a set of four distinct warnings on their Cloudways-hosted staging site, expressed concern about these notices appearing only on staging, while their live site (LandYourDreamApartment.com) remained clear. This scenario is a classic example of a staging environment either being out of sync or having specific configurations that differ from the production setup.

Understanding the Staging Site Warnings

Let's break down the warnings reported by the user, which appeared under their WooCommerce Status page (https://woocommerce-1000667-6729719.cloudwaysapps.com/wp-admin/admin.php?page=wc-status):

Hi. Big Thank You to WooC! Q: I‘m not very techy and I’m getting these 4 warnings on my Staging Site: https://woocommerce-1000667-6729719.cloudwaysapps.com/wp-admin/admin.php?page=wc-status • !Page does not contain the [woocommerce_cart] shortcode or the woocommerce/cart block. • !Page does not contain the [woocommerce_checkout] shortcode or the woocommerce/checkout block. • (Under) Payments, Connected to WPCOM: !No • (Under) Webhook delivery host !Delivered to landyourdreamapartment.com/wp-json/paypal/v1/incoming (this site: woocommerce-1000667-6729719.cloudwaysapps.com/wp-json/paypal/v1/incoming) On my live site, LandYourDreamApartment.com, I don't see any warnings. I did recently reconnect the Live site, for some reason WooC was asking for Stage 5 which had to be redone so I did that, and it seems fine now. If nothing is wrong I am hoping to clear off these warnings from the Staging site somehow. Please advise and thanks so much! Sincerely

1. Missing Cart and Checkout Shortcodes/Blocks

The warnings "!Page does not contain the [woocommerce_cart] shortcode or the woocommerce/cart block" and "!Page does not contain the [woocommerce_checkout] shortcode or the woocommerce/checkout block" indicate that WooCommerce cannot find its essential shortcodes or blocks on the pages designated as the Cart and Checkout pages. This is a critical issue as it prevents customers from completing purchases. On a staging site, this often occurs if:

  • The staging database was pulled from live but the page IDs for Cart/Checkout were changed, or the pages themselves were deleted/corrupted.
  • The pages exist, but their content was inadvertently removed or replaced.
  • WooCommerce's internal pointers to these pages are incorrect.

2. Payments, Connected to WPCOM: !No

The "!No" status under "Payments, Connected to WPCOM" signifies that the WooCommerce Payments plugin, or any other payment gateway that relies on a connection to WordPress.com (WPCOM) services for setup and management, is not properly connected or authenticated on the staging site. This is a common security measure; payment gateways often require explicit re-authentication when moved to a new domain or environment like a staging site.

3. Webhook Delivery Host Mismatch

The warning "Webhook delivery host !Delivered to landyourdreamapartment.com/wp-json/paypal/v1/incoming (this site: woocommerce-1000667-6729719.cloudwaysapps.com/wp-json/paypal/v1/incoming)" is highly insightful. It clearly shows that a webhook, likely for PayPal, is configured to send notifications to the live site's URL (landyourdreamapartment.com) instead of the staging site's URL (woocommerce-1000667-6729719.cloudwaysapps.com). This means any test transactions on the staging site won't properly communicate back to the staging environment, leading to order status issues or payment processing failures during testing. This usually happens if:

  • The staging site was created as a direct copy of the live site, including all plugin settings, without updating URLs.
  • The payment gateway's settings were not explicitly updated to reflect the staging URL.

The Solution: Synchronizing and Reconfiguring Your Staging Environment

The core problem here is a lack of proper synchronization and configuration specific to the staging environment. The user's mention of "Stage 5 reconnection" on the live site suggests that certain WooCommerce setup steps or payment gateway connections were re-initiated there, but these changes were not reflected or correctly configured on the staging site.

Here are the detailed steps to resolve these warnings and ensure your WooCommerce staging site functions correctly:

1. Verify and Re-establish WooCommerce Core Pages

First, ensure your Cart and Checkout pages are correctly set up and contain the necessary shortcodes or blocks.

  1. Check Page Content:
  2. Navigate to WordPress Admin > Pages.
  3. Find your designated Cart and Checkout pages (e.g., "Cart" and "Checkout").
  4. Edit each page and confirm it contains either the [woocommerce_cart] or [woocommerce_checkout] shortcode, or the respective WooCommerce block (e.g., "Cart" block, "Checkout" block) if you are using the Block Editor. If not, add them.
  5. Verify WooCommerce Settings:
  6. Go to WooCommerce > Settings > Advanced.
  7. Under "Page setup," ensure the correct pages are selected for Cart, Checkout, My account, and Terms and conditions.
  8. If pages were missing or incorrect, save changes.
  9. Utilize WooCommerce Tools (if necessary):
  10. If problems persist, go to WooCommerce > Status > Tools.
  11. Look for options like "Create default WooCommerce pages" or "Recreate WooCommerce pages." Running these can sometimes fix page assignment issues. Note: Back up your database before running such tools.

2. Reconnect Payment Gateways to WPCOM

For payment gateways that connect via WordPress.com, you will need to re-authenticate them on your staging site.

  1. Navigate to WooCommerce > Payments.
  2. Locate the payment gateway that requires WPCOM connection (e.g., WooCommerce Payments).
  3. There should be an option to "Connect" or "Reconnect" to WordPress.com. Follow the prompts to re-authenticate. This typically involves logging into your WordPress.com account and granting permissions to the staging site.

3. Update Webhook URLs for Staging

This is crucial for payment gateways like PayPal. You need to ensure any external service sending data back to your site is pointed to the correct staging URL.

  1. Check Payment Gateway Settings:
  2. Go to WooCommerce > Settings > Payments.
  3. Select the payment gateway (e.g., PayPal Standard or a specific PayPal plugin).
  4. Look for settings related to "IPN URL," "Webhook URL," or "Return URL."
  5. Ensure this URL uses your staging site's domain (https://woocommerce-1000667-6729719.cloudwaysapps.com/wp-json/paypal/v1/incoming in the user's case) instead of the live domain (landyourdreamapartment.com).
  6. Check External Service Configuration:
  7. For some gateways, the webhook URL is configured directly within your account on the payment processor's website (e.g., PayPal Developer Dashboard for IPN settings).
  8. Log into your PayPal account (or relevant payment gateway account).
  9. Navigate to your Instant Payment Notification (IPN) settings or Webhook settings.
  10. Update the Notification URL to your staging site's URL. Remember to revert this to your live site's URL after testing if you are using the same PayPal account for both environments. Ideally, use a separate sandbox/test account for staging.

4. General Staging Best Practices

  • Database Synchronization: When creating a staging site, ensure your hosting provider (like Cloudways) correctly updates all URLs in the database to reflect the staging domain. This is often the root cause of many staging-related issues.
  • Separate Accounts: For critical services like payment gateways, consider using separate sandbox or test accounts for your staging environment to avoid conflicts with your live transactions.
  • Regular Updates: Keep your staging site updated with the latest versions of WordPress, WooCommerce, and all plugins, mirroring your live site as closely as possible.
  • Testing: Thoroughly test all core functionalities (add to cart, checkout, payment processing) on your staging site after any changes or configuration updates.

Conclusion

The warnings on the user's WooCommerce staging site are not uncommon and are generally indicative of configuration mismatches between the live and staging environments. By systematically checking WooCommerce page setups, re-authenticating payment gateway connections, and ensuring webhook URLs point to the correct staging domain, store owners and developers can effectively resolve these issues. Proactive management of staging environments is key to a smooth development workflow and a robust online store, preventing unexpected issues from migrating to the production site.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools