Skip to content

Instantly share code, notes, and snippets.

View BFTrick's full-sized avatar

Patrick Rauland BFTrick

View GitHub Profile
@BFTrick
BFTrick / woocommerce-example-plugin.php
Created April 6, 2024 20:42
Packt Mastering WooCommerce - Example WooCommerce Plugin
<?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
@BFTrick
BFTrick / install-wp.sh
Last active April 1, 2024 04:14
Download & Install WordPress via Curl
curl -O https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress site
rm latest.zip
@BFTrick
BFTrick / woocommerce-settings-tab-demo.php
Last active March 26, 2024 10:48
A plugin demonstrating how to add a WooCommerce settings tab.
<?php
/**
* Plugin Name: WooCommerce Settings Tab Demo
* Plugin URI: https://gist.github.com/BFTrick/b5e3afa6f4f83ba2e54a
* Description: A plugin demonstrating how to add a WooCommerce settings tab.
* Author: Patrick Rauland
* Author URI: http://speakinginbytes.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
@BFTrick
BFTrick / woocommerce-email-new-address.php
Last active March 6, 2024 01:16
Email the site admin when a customer changes their address
<?php
/**
* Plugin Name: WooCommerce Email Customer Address
* Plugin URI: https://gist.github.com/BFTrick/7891074
* Description: Email the site admin when a customer changes their address
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0.1
*
* This program is free software: you can redistribute it and/or modify
@BFTrick
BFTrick / woocommerce-remove-virtual-billing-fields.php
Last active February 19, 2024 17:23
Remove the billing address fields for free virtual orders in WooCommerce
<?php
/**
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products
* Plugin URI: https://gist.github.com/BFTrick/7873168
* Description: Remove the billing address fields for free virtual orders
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 2.0
*
* This program is free software: you can redistribute it and/or modify
@BFTrick
BFTrick / woocommerce-accessible-sale-price.php
Last active February 14, 2024 05:34
Make WooCommerce Sale Prices Accessible
<?php
/*
Plugin Name: WooCommerce Make Sale Prices Accessible
Plugin URI: https://gist.github.com/BFTrick/47b0710a6d27332d0c109cfe75c58be6
Description: Make WooCommerce sale prices accessible
Version: 1.0
Author: Patrick Rauland
Author URI: http://speakinginbytes.com
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@BFTrick
BFTrick / woocommerce-check-terms.php
Last active February 12, 2024 12:02
Make the WooCommerce Terms & Conditions checkbox checked by default
<?php
/**
* Plugin Name: WooCommerce Check Terms & Conditions
* Plugin URI: https://gist.github.com/BFTrick/7789974
* Description: Make the Terms & Conditions checkbox checked by default
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
@BFTrick
BFTrick / woocommerce-move-product-price.php
Last active January 28, 2024 20:32
A demo plugin to move the WooCommerce sinmple product price lower
<?php
/*
Plugin Name: WooCommerce Move Product Page Price Lower
Plugin URI: https://gist.github.com/BFTrick/e19bd2bb648558ca78279c3d5ba9524e
Description: A demo plugin to move the WooCommerce sinmple product price lower
Version: 1.0
Author: Patrick Rauland
Author URI: http://speakinginbytes.com
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@BFTrick
BFTrick / woocommerce-display-country-code-in-currency.php
Last active December 14, 2023 00:01
Display the currency symbol with the currency code first
<?php
/**
* Plugin Name: WooCommerce Display Currency Code in Currency Symbol
* Plugin URI: https://gist.github.com/BFTrick/10681832
* Description: Add the currency code to the currency symbol in WooCommerce. Ex. USD $.
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
@BFTrick
BFTrick / woocommerce-only-ship-continental-us.php
Last active December 7, 2023 08:47
WooCommerce only ship to the continental US.
<?php
/**
* Plugin Name: WooCommerce Only Ship to Continental US
* Plugin URI: https://gist.github.com/BFTrick/7805588
* Description: Only Ship to the Continental US
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0.1
*
* This program is free software: you can redistribute it and/or modify