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
add_filter('woocommerce_get_price','change_price', 10, 2); | |
add_filter('woocommerce_get_regular_price','change_price', 10, 2); | |
add_filter('woocommerce_get_sale_price','change_price', 10, 2); | |
function change_price( $price, $product_id ){ | |
$front_prijs = get_field( 'front_prijs', $product_id ); | |
$tekst_na_prijs = get_field( 'tekst_na_prijs', $product_id ); |
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 | |
query_posts( array( 'post_type' => 'peeps', 'paged' => $paged ) ); | |
?> | |
<?php | |
$divider = 4; | |
$i = 1; | |
?> | |
<!-- open starting div before loop --> | |
<?php if (have_posts()) : ?> | |
<div class="row leaders"> |
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( 'woocommerce_email_headers', 'sh_add_bcc_order_email', 10, 3); | |
function sh_add_bcc_order_email( $headers, $email_id, $order ) { | |
// list of possible values for $email_id can be found here http://www.mootpoint.org/blog/customising-woocommerce-notification-emails-hooks-filters/ | |
if ($email_id == 'customer_completed_order') { | |
$bcc_email = "[email protected]"; // change to the required email address here | |
$headers .= 'BCC: ' . $bcc_email . "\r\n"; | |
} | |
return $headers; |
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
function allow_single_email_domain( $user_login, $user_email, $errors ) { | |
if ( strpos( $user_email, '@youralloweddomain.com' ) != -1 ) { | |
return; | |
} else { | |
$errors->add( 'bad_email_domain', '<strong>ERROR</strong>: This email domain is not allowed.' ); | |
} | |
} | |
add_action( 'register_post', 'allow_single_email_domain', 10, 3 ); |
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
//Customise Datepicker on contact forms | |
function nf_datepicker_modify_script( $args ){ | |
//for a list of arguments which can be used here, see the options here http://api.jqueryui.com/datepicker/ | |
$args['dateFormat'] = 'mm/dd/yy'; | |
$args['minDate'] = '06/15/15'; | |
$args['minDate'] = '10/15/15'; | |
return $args; | |
} | |
add_filter( 'ninja_forms_forms_display_datepicker_args', 'nf_datepicker_modify_script' ); |
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 Remove Description Tab | |
* Plugin URI: https://wordpress.org/support/topic/how-to-keep-additional-info-but-remove-description | |
* Description: **Remove the product description tab. | |
* Version: 1.0 | |
* Author: SteveHoneyNZ | |
* Tested up to: 4.3 | |
*/ | |
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
//Added at Line 107 | |
'New Zealand' => array( | |
'Courier Post' | |
=> 'http://trackandtrace.courierpost.co.nz/Search/%1$s', | |
'NZ Post' | |
=> 'http://www.nzpost.co.nz/tools/tracking?trackid=%1$s', | |
'Fastways' | |
=> 'http://www.fastway.co.nz/courier-services/track-your-parcel?l=%1$s', | |
'PBT Couriers' |
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 | |
// standard wp post_gallery filter set up | |
add_filter('post_gallery', 'bxslider_picturefill_gallery', 10, 2); | |
function bxslider_picturefill_gallery($output, $attr) { | |
global $post; | |
if (isset($attr['orderby'])) { |
NewerOlder