■ Custom WordPress Plugin Development

    Surgical plugin work. Not 600 lines pasted into functions.php.

    wp-content/mu-plugins/inspirelle-typeb-autocoupon.php

    v1.2.0

    <?php
    /**
     * Plugin Name: INSPIRELLE Type-B Auto-Coupon
     * Description: Auto-applies pre-issued store credit on renewal checkout.
     * Author:      Appycodes  (https://appycodes.dev)
     * Version:     1.2.0
     * Requires:    WooCommerce 8.x, WC Subscriptions 6.x
     */
    
    namespace Appycodes\Inspirelle\TypeBAutocoupon;
    
    if ( ! defined( 'ABSPATH' ) ) { exit; }
    
    // idempotent · per-session dedup · silent on failure · 0-order edge case handled
    add_action( 'woocommerce_before_checkout_form', __NAMESPACE__ . '\\maybe_apply', 20 );
    
    function maybe_apply(): void {
        // ...
    }
    Ritesh Agarwal, lead architect at Appycodes

    ■ Talk to the lead architect

    One feature, one integration, or one bug that needs proper plugin engineering? Bring it directly to Ritesh — no SDR, no qualification call.

    Ritesh Agarwal · Lead Architect, Appycodes · LinkedIn

    ■ What you get

    Six engagement shapes.

    01

    Surgical plugin work

    One feature, one integration, one bug — done as a proper plugin or mu-plugin. Namespaced, idempotent, in version control.

    02

    WooCommerce extensions

    Pricing rules, role-based access, custom shipping logic, gateway extensions, subscription extensions, ACF-driven inventory.

    03

    Third-party integrations

    Zoho, Salesforce, HubSpot, custom APIs — written as plugins with proper hook architecture and error handling.

    04

    WP + Composer + CI

    Version control + CI deploy pipelines. So plugins don't live in production cPanel forever, fixed by SSH and forgotten.

    05

    Plugin audits & takeovers

    Taking over a plugin built by another team. Making it stable, idempotent, version-controlled, and predictable.

    06

    Public plugin releases

    .org repo or private GitHub releases when the project requires distribution. SVN dance handled.

    ■ Evidence — three plugins, three shapes

    What real WordPress plugin code looks like.

    mu-plugin · stateful · 0-order edge case

    INSPIRELLE auto-coupon

    Auto-applies a customer's pre-issued store-credit coupon on the renewal checkout. Email-restricted (only applies if the cart customer's email matches the coupon restriction), per-session deduplicated (won't keep re-applying after the customer removes it manually), silent on failure (no scary red notices), and overrides WooCommerce's default coupon notice with a branded message.

    0-order edge case explicitly handled (where store credit fully covers the renewal — gateways behave differently). Per-session reset between browser sessions so a returning customer gets it again tomorrow.

    // branded override
    add_filter( 'woocommerce_coupon_message',
      function ( $msg, $msg_code, $coupon ) {
        if ( 'inspirelle_typeb' !== $coupon->get_code() ) return $msg;
        $amt = number_format( (float) $coupon->get_amount(), 2 );
        return "Your INSPIRELLE store credit of {$amt} has been applied to this renewal.";
      }, 10, 3
    );

    Plugin · namespaced · idempotent · dry-run-able

    Localize Links

    A WordPress plugin in the Appycodes\LocalizeLinks namespace that walks posts and rewrites internal links per locale, storing the localized content in per-locale postmeta (blog_content_{locale}).

    Idempotent — skips posts where the target meta is already populated, unless --force is set. Dry-run mode surfaces what would change without writing. Per-link diff output logged. Filter hook (appycodes_localize_links_meta_key) so the meta key template is customisable per project. Action hook (appycodes_localize_links_before_post) so other plugins can extend.

    # WP-CLI usage
    wp localize-links run --locale=fr --dry-run
    wp localize-links run --locale=fr           # writes
    wp localize-links run --locale=fr --force   # re-writes existing

    WooCommerce extension · ACF-driven · bug-fixed

    Per-size stock plugin

    WooCommerce extension for a garment store: ACF-driven per-size stock fields (XS / S / M / L / XL / XXL) summed to set total WC stock. Per-size add-to-cart validation reads the selected size from addon-* POST keys (because the site uses WooCommerce Product Add-ons). Stock reduction on order status change to processing / completed, guarded by a _appy_size_stock_reduced order meta flag for idempotency. Stock restoration on cancellation / refund.

    Real bug we caught and fixed: the existing function had an if ($total_stock > 0) guard that prevented stock from updating to zero when all sizes sold out, leaving the product listed as in-stock when it wasn't. Removed the guard and properly set _manage_stock and _stock_status.

    // BEFORE — bug
    if ( $total_stock > 0 ) {  // never updates to zero
      update_post_meta( $id, '_stock', $total_stock );
    }
    
    // AFTER — fixed
    update_post_meta( $id, '_stock', max(0, $total_stock) );
    update_post_meta( $id, '_manage_stock', 'yes' );
    update_post_meta( $id, '_stock_status',
      $total_stock > 0 ? 'instock' : 'outofstock' );

    Pair with custom WordPress, WooCommerce, and subscriptions engineering. Integration-heavy plugins ride alongside API & integration work.

    ▼ The Plugin-vs-functions.php Decision Box

    When functions.php is fine, and when it absolutely isn't.

    X-axis: lines of code. Y-axis: state / complexity. Each quadrant is what the right shape looks like.

    Low LOC · medium state

    Snippet plugin

    Add a custom dashboard widget, wp-cli command

    High LOC · stateful

    Real plugin

    WooCommerce extension, third-party integration, custom CPT engine

    Low LOC · stateless

    OK in functions.php

    Conditional class on body, hook the_content once

    Medium LOC · site-specific, must-not-deactivate

    mu-plugin

    INSPIRELLE auto-coupon, security headers, multisite-wide behaviour

    ← Lines of code · LowHigh →

    ■ Good fit if

    • Sites with one specific feature, integration, or bug that needs proper engineering
    • Operators who have 600+ lines in functions.php and would rather not
    • Teams who inherited a plugin from another agency and need someone to actually own it
    • WooCommerce stores needing a non-default behaviour shipped as production-grade code

    ■ Probably not a fit

    • Full WordPress site builds — that's the Custom WordPress page
    • Snippets you'd find on Stack Overflow — those don't need an agency
    • Teams that won't put plugins in version control on principle

    ■ How we ship plugins

    Composer + namespaces + CI. Like real software.

    Plugin
    PSR-4 autoloading · Composer · namespaced classes · proper hooks
    mu-plugins
    Site-specific code that must never be deactivated
    Idempotency
    Meta flags · checksums · dry-run modes · audit logs
    CI
    GitHub Actions / GitLab CI · PHPUnit · PHP_CodeSniffer · phpstan
    Deploy
    Composer-managed · version-controlled · staged rollout

    ■ One feature, done right

    Bring the brief. We'll ship the plugin in your repo, not in your cPanel.

    Brief the plugin

    Other services

    We build a lot more than this.

    Explore the rest of what we build.

    SaaS Web App Development

    MVP to production builds, multi-tenant, billing, AI features.

    Learn more

    React Native App Development

    iOS + Android in one codebase. Push, offline, OTA updates.

    Learn more

    Web App to Native Mobile App

    Convert your Lovable / Claude / Bolt web app to React Native or Flutter — backend reused.

    Learn more

    Technical SEO for SaaS

    Prerender, schema, Core Web Vitals — engineering-led SEO.

    Learn more

    Custom WordPress Development

    B2B marketplaces, membership sites, headless WordPress.

    Learn more

    Shopify Development Services

    Custom themes, migration to Shopify, Shopify apps, supplier-feed automation.

    Learn more

    Custom WooCommerce Development

    B2B wholesale, high-SKU catalogues, WooCommerce Subscriptions, Shopify-to-Woo migrations.

    Learn more

    Maintenance & Support

    Post-launch stability, security, monthly improvements.

    Learn more

    AI App Completion

    Take an AI-built prototype to a production-ready product.

    Learn more

    AI Prototype to Native App

    Convert AI-built web prototypes into native mobile apps.

    Learn more

    App Store Launch

    Submit, configure and optimise for App Store + Play Store.

    Learn more

    Tech Stack Migration

    Modernise legacy systems with zero-downtime migrations.

    Learn more

    White Label Development

    Engineering capacity for agencies, under your brand.

    Learn more

    Startup Launch Support

    From idea to live product — design, build, launch, growth.

    Learn more

    API & Integration

    Custom REST/GraphQL APIs and third-party integrations.

    Learn more

    AI SaaS Product Development

    Multi-tenant AI SaaS with subscriptions and admin dashboards.

    Learn more

    B2B Marketplace Development

    Marketplaces with credit, KYC, and trust infrastructure baked in.

    Learn more

    Custom LMS Development

    Customised Moodle deployments and bespoke Moodle mobile apps.

    Learn more

    Membership & WooCommerce Subscriptions

    Subscription recovery, dunning, migrations, combinatorial billing matrices.

    Learn more

    Shopify Migration

    Magento, WordPress, BigCommerce → Shopify. Redirect-engineering first.

    Learn more

    WordPress Security & Malware Removal

    Forensic incident response — Magecart, backdoors, DDoS, GDPR Art. 33.

    Learn more

    Laravel Development & Modernisation

    Four production Laravel platforms. ERPs, contracts, tendering.

    Learn more

    Stripe Billing Engineering

    Webhooks, metering, proration, dunning, multi-currency, reconciliation.

    Learn more

    Cloudflare Edge Engineering

    Workers, R2, WAF, Bulk Redirects. The full surface, not just the orange cloud.

    Learn more

    Internal Tools & Admin Dashboards

    Tender automation, contract operations, compliance calendars, calculators.

    Learn more

    Supabase Development

    RLS, multi-role auth, production-hardening Lovable / Bolt / v0 prototypes.

    Learn more

    Headless WordPress & WooCommerce

    WP + Next.js with preview, ISR, auth handoff, media pipeline, search.

    Learn more

    Sanity CMS Development

    Schema-first builds, multilingual setups, migrations from WP / Contentful / Strapi.

    Learn more

    Vue.js & Nuxt Development

    Four production Vue platforms. Vue + Laravel as the default pairing.

    Learn more

    WordPress Performance Optimisation

    nginx, PHP-FPM, slow-query analysis, plugin audit. Diagnostic engineering, not plugin installs.

    Learn more

    Knowledge Base & Community Platforms

    KB + forum + adjacent surfaces. Search, version-aware routing, role-based visibility.

    Learn more

    Event Ticketing Platforms

    Multi-day festivals, white-label venue groups, offline-capable door-staff apps.

    Learn more

    AI Chatbot, RAG & Agent

    Production RAG with chunking, hybrid retrieval, reranking, grounding, eval.

    Learn more

    Workflow Automation

    Make.com, n8n, Zapier, and custom Node workers — chosen by volume.

    Learn more

    Programmatic SEO Engineering

    Calculator- and location-driven SEO surfaces with real data and SSR.

    Learn more

    Python Django API Development

    DRF APIs for field-ops at scale — pan-India last-mile delivery for microfinance.

    Learn more