Creating Your First WooCommerce Plugin — a practical guide to create WooCommerce plugin with clear examples you can reuse in real projects.
WooCommerce Plugin Development Series (5/101). Prefer one article? Read the complete WooCommerce plugin development tutorial.
Short description
Add a plugin header, check for the `WooCommerce` class, then hook a simple feature.
Steps
- Create the plugin folder/file with a header.
- Require WooCommerce (or check class_exists).
- Activate and confirm no fatals.
Bootstrap check
<?php
/**
* Plugin Name: Acme Woo Tools
* Description: First WooCommerce extension.
* Requires Plugins: woocommerce
*/
add_action('plugins_loaded', function () {
if (! class_exists('WooCommerce')) {
return;
}
// boot features
});