Skip to content

Instantly share code, notes, and snippets.


Scott Buscemi scottbuscemi

  • Lumen Foundry
  • Los Angeles CA
View GitHub Profile
scottbuscemi / managewp_cloudflare_love
Created May 10, 2020
Getting ManageWP to talk nicely to Cloudflare managed sites
View managewp_cloudflare_love
# For a domain using Cloudflare's services, go to Firewall > Firewall Rules and follow these steps:
1. Enter a rule name (ie "Managewp")
2. Click "Edit expression"
3. Enter the following into the box:
(ip.src in { 52.32.
scottbuscemi / woo-gist.php
Created Jul 13, 2016
WooCommerce minimum order amount for subtotal only (don't include shipping+tax)
View woo-gist.php
// Add to your functions.php file
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
// Set this variable to specify a minimum order value
$minimum = 50;
if ( WC()->cart->subtotal < $minimum ) {
You can’t perform that action at this time.