Tag: AI

  • Stop Fighting WordPress: Leverage Block Bindings Now

    A client hit me up last month. They needed a slick video section on their product pages—dynamic content, different video for each product, you know the drill. My first thought? Classic. Just spin up an ACF field, grab the URL, and manually inject it into the template. Easy, right? And yeah, that worked. For about five minutes, until they wanted more control, directly in the editor, without touching custom fields. Total nightmare, man. That’s when I realized: we keep doing things the old way, but WordPress is moving. Fast. Especially with features like Block Bindings becoming more flexible, sticking to old habits is just leaving power on the table.

    It’s already August, and the Roadmap to 6.9 is out. Evolution of the site editor, refining content creation, performance improvements—it’s all on the docket. This means the back half of 2025 is going to be a wild ride for us developers. If you’re not keeping up, you’re falling behind. Period.

    Expanding Core Blocks: More Tools, Less Hassle?

    For years, the stance on new core blocks felt pretty rigid. Anything deemed “too niche” was left to third-party plugins. And for a long time, that was fine. But blocks are different. Theme authors, myself included, need a robust toolkit right out of the box to build unique designs without forcing users into a plugin-chasing frenzy. Thankfully, it looks like this stance might be softening. Matías Ventura, the Gutenberg lead architect, recently put it plainly: not having these blocks in core “severely limits the expressiveness that theme builders (and users) can depend upon.” He’s right. Relying on external plugins for fundamental elements just fragments the experience. It makes sense, man. More blocks in core means more consistency and less reliance on external dependencies that can, let’s be honest, break things.

    Theme.json Control: A Developer’s Dream

    Another area seeing some serious traction is deeper control over the block editor’s UI/UX via theme.json. This isn’t just about styling anymore; it’s about defining the editing experience itself. We’re still a ways off from full feature parity here, but the standardization of Core blocks via the ToolsPanel component is a massive step. Imagine having the power to enable or disable specific inspector controls and toolbar options right from your theme.json. As a theme author, the possibilities are endless for crafting a truly bespoke and intuitive user experience. This level of granular control is a game-changer, trust me on this.

    Block Bindings: The Real Game-Changer

    Alright, enough with the “might happens.” Let’s talk about something concrete: Block Bindings. This is as close to a sure thing as it gets, and it’s been cooking on the WordPress Developer Blog for a while. With the latest WordPress trunk, you can now customize which blocks and attributes can be bound. Before, it was limited to Heading, Paragraph, and Button blocks. Now, with the new block_bindings_supported_attributes_{$block_type} filter hook, things are wide open.

    Remember that client with the dynamic video section? This filter is the answer. Instead of a custom field injection, we can bind the video source directly. I wasted no time tinkering with this once the patch landed in WordPress trunk. Making the Video block’s src attribute bindable? Oh, it’s sweet.

    <?php
    add_filter( 'block_bindings_supported_attributes_core/video', 'devblog_bindable_video_attrs' );
    
    function devblog_bindable_video_attrs( array $attrs ): array
    {
    	return array_merge( $attrs, [ 'src' ] );
    }
    ?>

    This snippet? It’s all you need to open up the Video block for binding that src attribute. The beauty of this is that the user can pick their video, and if you’ve got a custom source, you can bind it up. Go check out the Block Bindings API tutorials on the Developer Blog for a deeper dive. The only problem I have with this feature is not having enough time to try out all the ideas I’ve had. Seriously. I’m going to have so much fun with this!

    Other Notable Shifts

    Beyond Block Bindings, there’s other crucial stuff happening. The Core AI team just published their AI Building Blocks for WordPress, outlining the PHP AI Client SDK, Abilities API, MCP Adapter, and AI Experiments Plugin. If AI integration is on your roadmap, you need to be in the #core-ai Slack channel. Also, the WordPress Coding Standards 3.2 release brings tighter checks and improved PHP 8.1+ support. No excuses for sloppy code now.

    On the data front, Data Views are getting a lot of attention with new fields, controls, operators, and grouping functionality. This is a big deal for custom admin screens and dynamic content listings. Plus, Playground CLI now defaults to PHP 8.3 and has Xdebug support. If you’re not using Playground for quick tests, you’re missing out. It’s a lifesaver. You can find more details on these updates directly on the Developer Blog, like the one found at https://developer.wordpress.org/news/2025/08/whats-new-for-developers-august-2025/.

    So, What’s the Point?

    The point is, WordPress isn’t standing still. The core team is actively pushing for a more robust, intuitive, and developer-friendly platform. Ignoring these advancements means you’re building with one hand tied behind your back. Embracing things like expanded core blocks, deeper theme.json control, and especially the evolving Block Bindings API means building sites that are more flexible, easier to manage, and ultimately, more future-proof. Don’t get stuck in the old ways; the new ways are better.

    Look, this stuff gets complicated fast. If you’re tired of debugging someone else’s mess and just want your site to work, drop my team a line. We’ve probably seen it before.

  • WooCommerce 10.3: Developer Insights and Essential Updates

    Just last month, I had a client, a mid-sized WooCommerce store, pulling their hair out trying to get accurate profit reports. They were piecing together spreadsheets, custom fields, and third-party plugins just to get a handle on their Cost of Goods Sold. Total nightmare. On top of that, their checkout process was clunky, causing friction and abandoned carts. You know the drill – endless manual address input, slow loading times, the whole nine yards.

    We’ve all been there, trying to patch up core WooCommerce functionality with plugins or custom code that eventually becomes a maintenance headache. My first thought, and honestly, what most developers would jump to, was to recommend another premium plugin or build a custom COGS solution. We’ve done it before, more times than I care to admit. But then I caught wind of what’s coming in WooCommerce 10.3, and I told them to hold fire. This update is a big deal for us developers and for merchants looking for more robust, built-in features.

    WooCommerce 10.3: Practical Core Updates

    WooCommerce 10.3, dropping October 22, 2025, isn’t just another incremental update. It’s bringing some heavy hitters into core, which means less reliance on third-party bloat and more stable, performant solutions straight out of the box. Let’s talk about the big one: Cost of Goods Sold (COGS) in WooCommerce core. This isn’t just a nicety; it’s fundamental. Finally, merchants can get proper profit margins per product and order without wrestling with external tools. For years, we’ve either built custom solutions or integrated clunky plugins that often struggled to keep up with inventory changes or complex pricing. Now, it’s just there. The impact on reporting and data-driven decisions is huge, trust me on this.

    Then there’s the address autocomplete for Checkout blocks and shortcode. If you’ve ever seen a client’s analytics showing high checkout abandonment, a slow or error-prone address entry is a common culprit. This core feature, especially for those using WooPayments with an active account, streamlines that entire process. For developers, they’ve laid out the hooks and documentation for implementing your own address provider. No more custom JavaScript hacks or heavy third-party API integrations just to get basic auto-completion. This is the right way to tackle checkout friction.

    // Example of a (simplified) filter for address autocomplete provider.
    // In reality, this would involve a class and more complex logic.
    add_filter( 'woocommerce_address_autocomplete_providers', 'my_custom_address_provider' );
    function my_custom_address_provider( $providers ) {
        $providers['my_provider'] = array(
            'label' => 'My Custom Address Provider',
            'callback' => 'My_Custom_Address_Provider::search_addresses',
        );
        return $providers;
    }
    

    Performance gains are also a core focus. The Product Collection Editor improvements significantly reduce requests for product data, meaning faster loading times in the backend and smoother editing. We’ve all dealt with sluggish admin areas, especially on larger stores with many products. Any win here is a win for both developers and merchants. They’ve also squashed those annoying “ghost” changes in the editor, which, man, could drive you crazy trying to figure out what you supposedly changed.

    The PayPal API Upgrade is another essential backend improvement. Moving from the legacy PayPal Standard (WPS) to PayPal Orders v2 API means more secure and faster transactions. Plus, those Express Checkout buttons (PayPal, Venmo, Pay Later) are going to make a noticeable difference in conversion rates. These are the kinds of updates that might not seem flashy but directly impact the bottom line.

    Experimental Features and Developer Advisories

    On the experimental front, features like the Add to Cart + Options block updating related product blocks based on variation selection are smart moves towards a more dynamic and intuitive product page experience. Also, the new WooCommerce MCP (Merchant Control Protocol) is opening up new possibilities for AI-assisted store management and development workflows. If you’re into automation, this is definitely something to keep an eye on, as detailed in the developer documentation.

    A quick head’s up for us plugin authors: the wc_format_decimal function will return an empty string starting with WooCommerce 10.3, leading into 10.4. If you’re using this, you need to revise your code. And thankfully, the coupon discount calculation bug causing unwanted recalculations when editing orders is reverted. That one was a pain point for many.

    So, What’s the Point?

    The takeaway here is clear: WooCommerce is maturing, bringing critical business features and performance enhancements into its core. As developers, this means fewer custom hacks and more stable platforms for our clients. It frees us up to build more innovative features rather than constantly patching over missing fundamentals. Stay updated, test your sites on beta releases, and leverage what core provides. It makes our lives easier and builds better stores.

    Look, this stuff gets complicated fast. If you’re tired of debugging someone else’s mess and just want your site to work, drop my team a line. We’ve probably seen it before.

  • Securing Your Legacy: WordPress Digital Permanence for the Long Haul

    Just the other day, I had a client call — a mid-sized non-profit, doing some seriously good work in digital literacy. They were looking at their strategic roadmap, talking about impact over the next 50, maybe 100 years. Then it hit them: what about their online presence? What about true WordPress Digital Permanence?

    They’d seen other long-standing organizations just… vanish. Domain expired, hosting account closed, the entire digital archive gone. A total nightmare. My first instinct, like any decent dev, was to talk about robust backup strategies, multi-year domain registrations, and rock-solid CDN setups. And yeah, those are table stakes. But when you’re talking about a century-long mission, that’s just kicking the can down the road. You need a solution that goes beyond typical maintenance cycles, something engineered for the long haul.

    Engineering for True WordPress Digital Permanence

    This isn’t just about keeping the lights on. It’s about building a digital fortress that can withstand administrative changes, funding shifts, and even technological obsolescence. The traditional model? It’s a series of recurring tasks, each a potential point of failure over decades. Forget one domain renewal amidst a leadership change, and your legacy is gone. Period.

    That’s where solutions like the WordPress.com 100-Year Plan come into play. It’s a different beast entirely. We’re talking about a system built from the ground up to address these generational challenges. The key here isn’t just hosting; it’s an *endowment model*. Financial provisions are set aside, explicitly to ensure the site’s continuity for a century. Think of it as a trust fund for your digital presence. This isn’t just some marketing fluff; it’s a pragmatic approach to a very real problem.

    Beyond the financial backing, it bundles in truly distributed cloud infrastructure, time-machine-like layered backups, and seamless trust-account continuity. The real kicker for me, as a dev who values data integrity, is the integration with the Internet Archive. Your content, your mission, isn’t just sitting on one server; it’s actively being preserved across multiple fronts. This level of digital legacy infrastructure, as highlighted in a recent article I read at wordpress.com/blog/2025/10/17/net-literacy-100-year-plan/, is what a non-profit like Net Literacy needed to secure its future.

    For those of us constantly building and maintaining, it’s about anticipating the unforseeable. You can try to script out a million cron jobs and reminders, but human error is inevitable over a century. A system designed to remove that burden entirely? That’s what we call a robust solution, man.

    What “Digital Fortress” Code Looks Like (Conceptually)

    <?php
    /**
     * Conceptual function to demonstrate extreme long-term digital preservation.
     * In reality, this is handled by a comprehensive platform like WordPress.com's 100-Year Plan.
     */
    function wp_ensure_digital_legacy_for_100_years() {
        // 1. Establish an endowed fund for operational costs.
        // This part is external to WordPress, a core component of the 100-Year Plan.
        // It's the "financial hook" that guarantees longevity.
    
        // 2. Implement geo-redundant hosting with automatic failover.
        // No single point of infrastructure failure.
        // register_shutdown_function( 'deploy_to_secondary_region' );
    
        // 3. Automated, multi-layered, off-site backups with versioning.
        // Think incremental, daily, weekly, monthly, yearly snapshots.
        // add_action( 'daily_backup_hook', 'run_layered_backups_to_archive' );
    
        // 4. Secure, trust-account based domain & SSL management.
        // No manual renewals ever. Automated legal and technical continuity.
        // add_filter( 'pre_option_domain_renewal_status', 'return_always_active' );
    
        // 5. Regular content ingestion to public archives (e.g., Internet Archive).
        // Ensure public accessibility even if primary site goes down.
        // add_action( 'publish_post', 'send_to_internet_archive_api' );
    
        // If you're building something that needs to last generations,
        // your "code" needs to extend beyond PHP hooks and into operational guarantees.
    }
    ?>

    So, What’s the Point?

    The takeaway is simple: for mission-critical sites, especially non-profits or organizations with a mandate for long-term information preservation, standard hosting isn’t enough. You need to think beyond the next few years and plan for generations. This isn’t just about uptime; it’s about immutable digital heritage. It’s about not having to worry that your work will disappear because someone forgot to update a credit card.

    Look, this stuff gets complicated fast. If you’re tired of debugging someone else’s mess and just want your site to work, drop my team a line. We’ve probably seen it before.

  • WooCommerce AI: Secure Integrations with MCP Beta

    Had a client last week, big shop, always looking for an edge. He wanted AI to handle some routine product updates and maybe even streamline customer service replies. Sounded great on paper, right? But the immediate thought for many, and frankly, my first instinct years ago, would be to cobble together custom scripts, maybe hit the WooCommerce REST API directly with a bespoke AI solution. Total nightmare waiting to happen, trust me on this.

    That’s where the new WooCommerce Model Context Protocol (MCP) Beta comes in. It’s exactly what shops like his, and yours, need to get serious about WooCommerce AI without building a house of cards. No more trying to duct-tape external AI services directly to your precious store data; this beta provides a structured, secure way for AI assistants like Claude, Cursor, or even your custom scripts, to interact with your WooCommerce store.

    Why a Standardized WooCommerce AI Protocol Matters

    The core problem with ad-hoc AI integrations? Security and scalability. Every time you build a custom bridge, you’re opening a new potential vulnerability. Plus, maintaining those bespoke integrations across different AI tools and WooCommerce updates? Forget about it. The MCP gives us an open standard, meaning AI applications can securely connect to external data and tools, and crucially, WooCommerce store operations are exposed as discoverable tools with proper authentication and permissions. It’s a proper handshake, not a back-alley deal.

    This isn’t some fly-by-night solution either. The WooCommerce MCP integration is built solid, leveraging existing WordPress core technologies. We’re talking the WordPress Abilities API for defining what operations are available and how they should be executed, and the WordPress MCP Adapter handling the protocol-level communication. This means it respects your existing security and permission models. You get the power of AI without sacrificing the robustness you expect from WordPress and WooCommerce.

    Getting Started with WooCommerce MCP

    If you’re running WooCommerce 10.3 or later, have HTTPS enabled, and standard REST API keys, you’re ready to dive in. Enabling the feature is straightforward. You can toggle it in the WooCommerce Admin settings under WooCommerce > Settings > Advanced > Features, use WP-CLI, or, as a developer, enable it programmatically. Here’s how you’d flip the switch with PHP:

    <?php
    add_filter( 'woocommerce_features', function( $features ) {
        $features['mcp_integration'] = true;
        return $features;
    });
    ?>

    Once enabled, you’ll be able to tap into AI-assisted product and order management. This beta already allows for listing, retrieving, creating, updating, and deleting products and orders. All operations respect your WooCommerce permission system, so your AI won’t go rogue deleting your entire catalog unless you explicitly let it. For comprehensive setup details and to dig deeper into its extensibility, check the official documentation at developer.woocommerce.com/docs/features/mcp/. It’s a solid resource.

    So, What’s the Point?

    The point is, AI is here, and it’s not going anywhere. Instead of watching clients try to build fragile, custom integrations, WooCommerce is giving us a proper, secure, and extensible protocol for WooCommerce AI. This isn’t just about making things “easier”; it’s about making them *right*. It’s a beta, so expect some evolution, but the foundation is solid for serious automation and development workflows.

    Look, this stuff gets complicated fast. If you’re tired of debugging someone else’s mess and just want your site to work, drop my team a line. We’ve probably seen it before.

  • WordPress Block Development: September’s Core Updates Deliver

    Just last week, a client hit me up. Their marketing team was wrestling with an existing page, trying to add some simple accordions and custom-styled form fields without breaking anything. The current setup? A total nightmare of custom JS and inline styles from an older theme. I looked at it and thought, “Man, this used to be a headache to implement properly, especially if you needed it accessible.” But here’s the kicker: WordPress core, especially with the September 2025 updates, is making this kind of stuff genuinely straightforward now.

    If you’ve been knee-deep in custom block development, or just trying to keep up with how WordPress is evolving, these updates are solid. They’re not flashy marketing buzz; they’re practical tools that make our jobs easier and client sites more robust. We’re talking about significant strides in core functionality that streamline development, reduce custom code, and ultimately, make sites more maintainable.

    Streamlining WordPress Block Development

    First up, the official “What’s new for developers?” September 2025 report on the WordPress Developer Blog highlights the new **Accordion block**. This has been a long time coming. We’ve all built countless custom accordion solutions, often fighting with accessibility standards (WCAG, USWDS) or patching things together with conflicting JavaScript. Now, WordPress gives us native Accordion, Accordion Item, Header, and Panel blocks, all powered by the Interactivity API. This means less custom code, better semantics out of the box, and a more consistent user experience. Trust me, rolling your own accessible accordion from scratch is not fun, and having this in core is a huge win for cleaner block development.

    Next, let’s talk about styling. Remember the days of fighting with global CSS overrides for basic form elements? It was messy. With the continued effort to allow `theme.json` to style form elements, you can now target text inputs, textareas, and even select/dropdown elements directly. This is massive for maintaining a consistent design system. You can centralize your form styling right in your theme’s `theme.json`, making it predictable and easy to manage without adding a bunch of extra CSS that conflicts everywhere. For example, to style your text inputs:

    "elements": {
    	"textInput": {
    		"border": {
    			"radius": "0",
    			"style": "solid",
    			"width": "1px",
    			"color": "red"
    		},
    		"color": {
    			"text": "var(--wp--preset--color--theme-2)"
    		},
    		"typography": {
    			"fontFamily": "var(--wp--preset--font-family--inter)"
    		}
    	}
    }

    This kind of control, right from `theme.json`, removes a ton of boilerplate and ensures your styles are applied universally. It’s what we always wanted for true block themes, and it’s finally here.

    Beyond styling, the `@wordpress/create-block` package now allows block variants to define their own template files. If you’ve ever built complex blocks with many variations, you know the pain of conditional logic within a single template. This update simplifies managing those templates significantly. It’s a small change, but it makes a huge difference in the long-term maintainability of your custom blocks.

    And speaking of foundational work, the **Abilities API** is getting a Composer package and the PHP AI Client saw its first stable release. For those integrating advanced permissions or dabbling with AI in WordPress, this is the groundwork being laid. It means a more structured and official way to extend core functionality, rather than relying on custom solutions that might break with every major update.

    So, What’s the Point?

    The takeaway here is clear: WordPress core development is moving fast, and in the right direction. These aren’t just minor tweaks; they are foundational improvements that empower developers to build better, more maintainable, and more compliant sites with less effort. Leveraging these core features means fewer custom hacks, less technical debt, and more time focusing on what really matters for your clients.

    Look, this stuff gets complicated fast. If you’re tired of debugging someone else’s mess and just want your site to work, drop my team a line. We’ve probably seen it before.