This file contains hidden or 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: Disable CF7 plugin | |
Plugin URI: http://www.damiencarbery.com | |
Description: Disable Contact Form 7 plugin except for certain pages. | |
Author: Damien Carbery | |
Version: $Revision: $ | |
$Id: $ | |
*/ |
This file contains hidden or 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: Price Upon Request | |
* Plugin URI: https://gist.github.com/helgatheviking/6278f960f5fb7fca101e75f30f33141c | |
* Description: Switch Free prices to "Price upon Request" | |
* Version: 0.1.0 | |
* Author: helgatheviking | |
* Author URI: https://kathyisawesome.com | |
* Requires at least: 4.7 | |
* Tested up to: 4.7 |
This file contains hidden or 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 | |
add_action( 'wp_head', function() { | |
?> | |
<script> | |
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
Flatsome.behaviors['lazy-load-images'].attach(); | |
Flatsome.behaviors['quick-view'].attach(); | |
}); |
This file contains hidden or 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 /** | |
* Adds a custom column to the user display dashboard. | |
* | |
* @param $columns The array of columns that are displayed on the user dashboard | |
* @return The updated array of columns now including zip codes. | |
*/ | |
function new_modify_user_table( $column ) { | |
$column['register_phone'] = 'Phone'; | |
$column['zip_code'] = 'Zip'; | |
return $column; |
This file contains hidden or 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: Contact Form 7 - Success Page Redirects | |
* Description: An add-on for Contact Form 7 that provides a straightforward method to redirect visitors to success pages or thank you pages. | |
* Version: 1.2.0 | |
* Author: Ryan Nevius | |
* Author URI: http://www.ryannevius.com | |
* License: GPLv3 | |
*/ |
This file contains hidden or 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 | |
add_action( 'woocommerce_checkout_process', 'address_has_number'); | |
function address_has_number() { | |
$billing_address_1 = $_POST[ 'billing_address_1' ]; | |
if ( preg_match('/^\d/', $billing_address_1 ) === 1 ){ | |
wc_add_notice( __( 'Your address does not have a number.' ), 'error' ); |
This file contains hidden or 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 | |
/** | |
* Email Styles | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-styles.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
This file contains hidden or 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
function my_wc_custom_get_price_html( $price, $product ) { | |
if ( $product->get_price() == 0 ) { | |
if ( $product->is_on_sale() && $product->get_regular_price() ) { | |
$regular_price = wc_get_price_to_display( $product, array( 'qty' => 1, 'price' => $product->get_regular_price() ) ); | |
$price = wc_format_price_range( $regular_price, __( 'Free!', 'woocommerce' ) ); | |
} else { | |
$price = '<span class="amount">' . __( 'Free!', 'woocommerce' ) . '</span>'; | |
} | |
} |
This file contains hidden or 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 // Do not include this if already open! | |
/** | |
* Code goes in theme functions.php. | |
*/ | |
add_filter( 'woocommerce_defer_transactional_emails', '__return_false' ); |
This file contains hidden or 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
function my_wc_custom_get_price_html( $price, $product ) { | |
if ( $product->get_price() == 0 ) { | |
if ( $product->is_on_sale() && $product->get_regular_price() ) { | |
$regular_price = wc_get_price_to_display( $product, array( 'qty' => 1, 'price' => $product->get_regular_price() ) ); | |
$price = wc_format_price_range( $regular_price, __( 'Free!', 'woocommerce' ) ); | |
} else { | |
$price = '<span class="amount">' . __( 'Free!', 'woocommerce' ) . '</span>'; | |
} | |
} |