A WooCommerce plugin combining Google Merchant Center compliance, financial auditing, and dynamic pricing.
- PHP 8.1+
- WordPress 5.8+
- WooCommerce (active)
cirrusly-commerce/
├── cirrusly-commerce.php # Main plugin file, Freemius init, bootstrap
├── includes/
│ ├── class-core.php # Subsystem loader, Pro gating, hooks, cron router
│ ├── class-gmc.php # Google Merchant Center compliance scanning
│ ├── class-audit.php # Per-product P&L calculations
│ ├── class-pricing.php # MSRP display, margin calculations
│ ├── class-badges.php # Smart badge rendering
│ ├── class-blocks.php # Gutenberg block registration
│ ├── class-countdown.php # Time-limited promotions
│ ├── class-compatibility.php # SEO plugin integrations
│ ├── class-security.php # AES-256-CBC encryption for API keys
│ ├── admin/
│ │ ├── class-settings-manager.php # Settings, cron scheduling
│ │ ├── class-admin-assets.php # Script/style enqueuing
│ │ ├── class-dashboard-ui.php # WordPress dashboard widget
│ │ ├── class-gmc-ui.php # Compliance hub interface
│ │ ├── class-audit-ui.php # Financial audit table
│ │ ├── class-pricing-ui.php # Pricing configuration
│ │ ├── class-setup-wizard.php # Onboarding flow
│ │ └── class-debug-ui.php # System diagnostics
│ └── pro/
│ ├── class-google-api-client.php # Google API gateway, quota tracking
│ ├── class-gmc-pro.php # Real-time API sync
│ ├── class-analytics-pro.php # Dashboard UI (Pro Plus)
│ ├── class-product-studio.php # AI product tools (Pro Plus)
│ ├── class-gmc-analytics.php # GMC metrics (Pro Plus)
│ ├── class-automated-discounts.php # Dynamic pricing
│ └── class-pricing-sync.php # Real-time price sync
├── assets/
│ ├── css/ # Stylesheets (no build process)
│ ├── js/ # Scripts (no build process)
│ └── images/ # Plugin assets
└── vendor/
└── freemius/ # Licensing SDK
-
Clone the repository into your WordPress plugins directory:
git clone https://github.com/cirruslyweather/cirrusly-commerce.git wp-content/plugins/cirrusly-commerce
-
Activate the plugin in WordPress admin
-
For Pro feature development, use dev mode (requires
WP_DEBUG=true):?cirrusly_dev_mode=pro # Enable Pro features ?cirrusly_dev_mode=free # Force free mode
This plugin has no build/transpilation pipeline. PHP, CSS, and JavaScript files are served directly—no webpack, gulp, or compilation required.
There is currently no automated test suite. Development relies on manual testing with WooCommerce and test products configured.
Pro classes load conditionally to reduce frontend overhead:
// Admin-only
if ( is_admin() && file_exists( $path ) ) {
require_once $path;
}
// Admin + cron (no frontend)
if ( ( is_admin() || wp_doing_cron() ) && file_exists( $path ) ) {
require_once $path;
}Use update_option() for persistent data. Production environments with Redis/Memcached store transients in memory-only cache, causing data loss on cache flush.
// Correct (Redis-safe)
update_option( 'cirrusly_audit_data', $data, false );
// Incorrect (data loss with Redis)
set_transient( 'cirrusly_audit_data', $data, 3600 );if ( Cirrusly_Commerce_Core::cirrusly_is_pro() ) {
// Pro tier or higher
}
if ( Cirrusly_Commerce_Core::cirrusly_is_pro_plus() ) {
// Pro Plus only
}Use constants instead of hardcoded plan IDs:
Cirrusly_Commerce_API_Key_Manager::PLAN_ID_FREE // '36829'
Cirrusly_Commerce_API_Key_Manager::PLAN_ID_PRO // '36830'
Cirrusly_Commerce_API_Key_Manager::PLAN_ID_PROPLUS // '37116'// AJAX handler validation order
if ( ! check_ajax_referer( 'cirrusly_audit_save', '_nonce', false ) ) {
wp_send_json_error( 'Invalid nonce' );
}
if ( ! current_user_can( 'edit_products' ) ) {
wp_send_json_error( 'Permission denied' );
}
// Always wp_unslash() before sanitize_*()
$value = sanitize_text_field( wp_unslash( $_POST['field'] ) );- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Follow existing code patterns and WordPress coding standards
- Test with WooCommerce active and configured
- Submit a pull request against
main
- Use
update_option()for persistent data (not transients) - Check Pro status before loading Pro files
- Use static
init()methods to prevent duplicate hook registration - Clear caches on product updates (
Cirrusly_Commerce_Core::clear_metrics_cache()) - Follow the v2.0 UI design system in
class-analytics-pro.phpfor new admin pages
Update version in three places:
cirrusly-commerce.php— Plugin headercirrusly-commerce.php—CIRRUSLY_COMMERCE_VERSIONconstantreadme.txt— Stable tag
GPLv2 or later. See LICENSE for details.