Skip to content

v4.6.4: Fix WooCommerce Email Preview Redirect

Choose a tag to compare

@joshuabink joshuabink released this 06 May 10:59
· 15 commits to main since this release

Fixed

  • WooCommerce Email Preview Redirect Issue: Simplified the dashboard redirect logic to be more robust. The plugin now only redirects pure /wp-admin/index.php requests with zero query parameters. Any request with GET parameters (including WooCommerce email preview requests like ?preview_woocommerce_mail&nonce=...) is allowed through without redirection.

Changed

  • Removed complex parameter whitelisting approach (section, tab, action, etc.)
  • New logic: Only redirect if accessing /wp-admin/index.php with ZERO query parameters
  • More defensive and covers edge cases automatically

Technical Details

  • The plugin correctly identifies that WooCommerce uses ?preview_woocommerce_mail&nonce=... parameters for email preview
  • Any GET parameter prevents the redirect, protecting other WordPress admin features as well