Refactor/reduce complexity v2#402
Merged
lalit-swain-cko merged 28 commits intomasterfrom Jan 21, 2026
Merged
Conversation
added 26 commits
January 13, 2026 18:36
- Fix workflow region validation to prevent invalid API URLs - Add input sanitization for region settings - Early load utility class to fix critical error on plugin activation - Wrap debug error_log statements in WP_DEBUG checks - Remove unnecessary debug logging from wrapper functions - Regenerate composer autoloader without dev dependencies - Restore README.md and languages/README.md files - Improve production readiness and WordPress coding standards compliance
- Add validation to check API keys before SDK initialization - Gracefully handle empty keys during initial setup/registration - Only log SDK initialization failures when WP_DEBUG is enabled - Fix region subdomain validation to handle 'global' value - Use null coalescing operator for safer array access
- Update Flow webhook handler Method 3 to check both _cko_flow_payment_id and _cko_payment_id meta keys - Add immediate order save after PayPal Express payment ID is set (before status update) - Process pending webhooks after payment ID is saved to handle race conditions - Update payment ID validation to check both meta keys for compatibility - Fixes issue where PayPal Express orders (using _cko_payment_id) were not found by webhook handler - Ensures webhooks can match orders regardless of payment method type
- Fix payment method title spacing issues on checkout page for both newer and older WooCommerce versions - Add higher specificity CSS rules to override theme styles - Move Terms Checkbox Guard setting to Advanced → Debug Settings - Improve webhook/workflow duplicate detection with URL normalization - Add auto-generated webhook/workflow names - Enhance error messaging for multiple webhook scenarios - Add Flow integration modules for better code organization - Improve CSS loading order to ensure proper style precedence
…der-first checkout flow - Remove all Reflection usage and migrate to public WooCommerce APIs - Implement order-first checkout flow using WC()->checkout->create_order() for subscription compatibility - Add proper WooCommerce hooks (woocommerce_checkout_order_processed, etc.) - Fix webhook queue cleanup handler with proper error handling and redirects - Register standalone webhook queue admin page for action handlers - Move diagnostics to admin-only tools page (class-wc-checkoutcom-diagnostics.php) - Remove subscription diagnostic logs - Add Docker setup files for local development - Fix WordPress coding standards (sanitization, capability checks, nonces) - Remove test scripts from build (moved to admin diagnostics page)
- Remove Docker setup files from git tracking (keep locally for development) - Add Docker files to .gitignore to prevent future commits
- Handle responses that contain extra output before JSON (e.g., '200' prefix) - Extract JSON from response text even if plugins/server inject output - Prevents parsererror when response is valid JSON but has leading characters - Minimal performance impact (only runs on order creation AJAX call)
…ctions - Prefix all Flow CSS classes with cko-flow__ (BEM naming convention) - Prefix global functions with cko_ prefix - Update JavaScript to use prefixed CSS classes - Scope admin script enqueues to specific pages - Fix CSS syntax errors and brace balance
- Remove inline styles and hardcoded headings from express checkout buttons - Move minimal CSS to external stylesheet for theme compatibility - Remove 'Express Checkout' headings to let themes control labels - Unify cart page button placement - all buttons now render in shared container - Consistent placement for Apple Pay, Google Pay, and PayPal on cart page - Industry-standard approach: minimal plugin CSS, provider handles button styling
- Add manual sync for Flow settings (flow_component_cardholder_name_position, flow_show_card_holder_name, flow_saved_payment) in Card Settings save handler - Normalize cardholder name position value (top/bottom/hidden) in flow-customization.js - Only prefill cardholder name when position is not 'hidden' - Ensures settings save correctly and pass through to Flow SDK
added 2 commits
January 21, 2026 14:06
- Fix admin.js loading on main Payments list to hide duplicate gateways - Update README with comprehensive upgrade guide to Flow - Add Express Payments Apple Pay setup guide with detailed steps - Document Card Settings and Order Settings review steps
|
heitor-viana-cko
approved these changes
Jan 21, 2026
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.




No description provided.