Created
April 6, 2024 20:42
-
-
Save BFTrick/28668090fa177608ba5918518805d3d8 to your computer and use it in GitHub Desktop.
Packt Mastering WooCommerce - Example WooCommerce Plugin
This file contains 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
<?php | |
/* | |
* Plugin Name: WooCommerce Example Plugin | |
* Requires Plugins: woocommerce | |
* Plugin URI: http://speakinginbytes.com | |
* Description: Our custom WooCommerce functionality | |
* Version: 2.0 | |
* Author: Patrick Rauland | |
* Author URI: http://speakinginbytes.com | |
* License: GPL2 | |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
* Text Domain: woocommerce-example-plugin | |
* Domain Path: /languages | |
*/ | |
// only run if there's no other class with this name | |
if ( ! class_exists('WC_Example')){ | |
class WC_Example{ | |
public function __construct(){ | |
// add more code here | |
} | |
} | |
// Start running our plugin | |
$GLOBALS['wc_example'] = new WC_Example(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment