feat: Add High Performance Order Storage support for WooCommerce compatibility#176
Conversation
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant WooCommerce
participant WePOS
WooCommerce->>WePOS: before_woocommerce_init action
WePOS->>WePOS: declare_woocommerce_feature_compatibility()
alt FeaturesUtil exists
WePOS->>WooCommerce: FeaturesUtil::declare_compatibility('custom_order_tables', plugin_file, true)
end
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
wepos.php (1)
126-138: Replace placeholder@sincetag and consider importingFeaturesUtil
Update the docblock’s@sinceto the actual plugin version and optionally aliasFeaturesUtilfor cleaner calls.Proposed diff:
126c126 - * @since WEPOS_SINCE + * @since 1.3.0Optional import at the top of the file:
+use Automattic\WooCommerce\Utilities\FeaturesUtil;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
wepos.php(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: e2e_api tests
🔇 Additional comments (1)
wepos.php (1)
87-89: Registering HPOS compatibility hook
Thebefore_woocommerce_inithook correctly invokes the compatibility declaration early in WooCommerce’s bootstrap. This ensures HPOS support is declared before WooCommerce finishes initialization.
This PR adds compatibility for WooCommerce's High-Performance Order Storage (HPOS) feature to the wePOS plugin. When HPOS was enabled, orders were not appearing in the wePOS interface due to incompatible query methods.
Changes made:
Changelog entry
Related Issues
Testing Instructions
Screenshots/Video
described in issue description
Technical Notes
Summary by CodeRabbit