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 | |
add_filter( 'wpforms_email_headers', function ( $headers, $emails ) { | |
// APPLY THE BCC TO THIS FORM ID ONLY. | |
// CHANGE THE ID TO THE FORM YOU NEED. OR REMOVE THE WHOLE IF BLOCK IF NEEDED FOR ALL FORMS. | |
if ( 384 !== $emails->form_data['id'] ) { | |
return $headers; | |
} | |
// CHANGE THIS EMAIL ADDRESS TO YOURS: |
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 | |
/** | |
* Add below function in theme functions.php file | |
*/ | |
add_filter('woocommerce_product_addons_option_price', 'theme_name_product_addons_show_msrp', 20, 4); | |
function theme_name_product_addons_show_msrp($html, $option, $idx, $type) { | |
// User has chosen not to show MSRP, don't show it |
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
/* Woocommerce regular Sale badge */ | |
.woocommerce span.onsale { | |
left: 0; | |
top: -10; | |
font-weight: 600 !important; | |
min-width: 100px !important; | |
text-align: center; | |
} | |
.woocommerce ul.products li.product .onsale { |
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 // Don't use this line. | |
/* | |
* Add the script below to wherever you store custom code snippets | |
* in your site, whether that's your child theme's functions.php, | |
* a custom plugin file, or through a code snippet plugin. | |
*/ | |
/** | |
* This function will connect wp_mail to your authenticated |
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
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _ | |
"URLDownloadToFileA" (ByVal pCaller As Long, _ | |
ByVal szURL As String, _ | |
ByVal szFileName As String, _ | |
ByVal dwReserved As Long, _ | |
ByVal lpfnCB As Long) As Long | |
Public Sub GURoL(url As String, FileName As String) | |
Dim lngRetVal As Long | |
lngRetVal = URLDownloadToFile(0, url, FileName, 0, 0) |
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
function wc_dropdown_variation_attribute_options( $args = array() ) { | |
global $product; | |
$variations = $product->get_available_variations(); | |
$args = wp_parse_args( apply_filters( 'woocommerce_dropdown_variation_attribute_options_args', $args ), array( | |
'options' => false, | |
'attribute' => false, | |
'product' => false, | |
'selected' => false, | |
'name' => '', |
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 | |
/** | |
* Modified from https://www.skyverge.com/blog/add-woocommerce-email-recipients-conditionally/ | |
* | |
* Add another email recipient for admin New Order emails if a product from a specific category or with a specific tag is ordered | |
* | |
* @param string $recipient a comma-separated string of email recipients (will turn into an array after this filter!) | |
* @param \WC_Order $order the order object for which the email is sent | |
* @return string $recipient the updated list of email recipients | |
*/ |
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: Custom Register Fields | |
Plugin URI: http://www.lcavanagh.bluehoststaff.com/ | |
Description: Add first name, last name and job title. | |
Author: Luke Cavanagh | |
Version: 1.0 | |
Author URI: http://www.lcavanagh.bluehoststaff.com/ | |
GNU General Public License, Free Software Foundation <http://creativecommons.org/licenses/GPL/2.0/> | |
*/ |
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
#!/bin/bash | |
################################################################################################ | |
# Fully automated script to install Odoo and Odoo SaaS Tool (tested on a fresh Ubuntu 14.04 LTS) | |
# * Install & configure last stable version of nginx | |
# * Install & configure last stable version of postgresql | |
# * Install & configure Odoo | |
# * Configure automated backup of Odoo databases | |
# * Optional: Install & configure Odoo SaaS Tool | |
# * Optional: Background installation: $ nohup ./odoo_install.sh > nohup.log 2>&1 </dev/null & | |
################################################################################################ |
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
OPTION 1 - Add a warning that you need a stronger password. | |
/* WC Vendors - Add a "Need a strong password" notice to the My Account Page */ | |
add_action( 'woocommerce_register_form', 'wcvendors_notify_password_myaccount' ); | |
function wcvendors_notify_password_myaccount() { | |
echo '<strong>Important</strong> -- This site respects your security. We require all new members to use a strong password. If you can not click the Register button, <strong>you need a stronger password</strong>.<br><br>'; | |
} | |
/* WC Vendors - Add a "Need a strong password" notice to the Checkout Page */ | |
add_action( 'woocommerce_after_checkout_registration_form', 'wcvendors_notify_password_checkout' ); | |
function wcvendors_notify_password_checkout() { |