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 the code below to your theme's functions.php file to add a confirm password field on the register form under My Accounts. | |
add_filter('woocommerce_registration_errors', 'registration_errors_validation', 10,3); | |
function registration_errors_validation($reg_errors, $sanitized_user_login, $user_email) { | |
global $woocommerce; | |
extract( $_POST ); | |
if ( strcmp( $password, $password2 ) !== 0 ) { | |
return new WP_Error( 'registration-error', __( 'Passwords do not match.', 'woocommerce' ) ); | |
} |
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
// Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php) | |
add_filter('add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment'); | |
function woocommerce_header_add_to_cart_fragment( $fragments ) { | |
global $woocommerce; | |
ob_start(); | |
?> | |
<a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a> |
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 snippet to your functions.php file to add a second password field to the WooCommerce checkout page. | |
add_action( 'woocommerce_checkout_init', 'wc_add_confirm_password_checkout', 10, 1 ); | |
function wc_add_confirm_password_checkout( $checkout ) { | |
if ( get_option( 'woocommerce_registration_generate_password' ) == 'no' ) { | |
$checkout->checkout_fields['account']['account_password2'] = array( | |
'type' => 'password', | |
'label' => __( 'Confirm password', 'woocommerce' ), | |
'required' => true, | |
'placeholder' => _x( 'Confirm password', 'placeholder', 'woocommerce' ) | |
); |
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 to functions.php if you want a redirect to happen when the store is closed. | |
// Comment out when store needs to open again | |
add_action('template_redirect','store_closed'); | |
function store_closed(){ | |
if (!is_admin() && is_woocommerce()){ | |
wp_redirect('/store-closed/'); // Change store-closed to permalink you'd like to use | |
exit; | |
} | |
} |
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 instead of [submit] in Contact Form 7 | |
<button type="submit" class="btn btn-large btn-primary"><i class="fa fa-bed"></i></button> | |
<img class="ajax-loader" src="http://www.yoursite.com/wp-content/plugins/contact-form-7/images/ajax-loader.gif" alt="Sending ..." style="visibility: hidden; opacity: 1;"> |
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 to your functions.php file */ | |
add_filter( 'jobify_registeration_redirect', array( 'rulRedirectPostRegistration', 'post_registration_wrapper' ), 10, 1 ); |
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: Primux Mailchimp | |
Plugin URI: http://primux.dk/ | |
Description: Add new users to a Mailchimp list | |
Version: 1.0 | |
Author: Primux Media | |
Author URI: http://primux.dk/ | |
*/ |
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
share-buttons.xyz | |
traffic2cash.xyz | |
с.новым.годом.рф | |
net-profits.xyz | |
social-widget.xyz | |
free-social-buttons.xyz | |
4webmasters.org | |
76brighton.co.uk | |
7makemoneyonline.com | |
acads.net |
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 a 3% surcharge to your cart / checkout | |
* change the $percentage to set the surcharge to a value to suit | |
*/ | |
add_action( 'woocommerce_cart_calculate_fees','woocommerce_custom_surcharge' ); | |
function woocommerce_custom_surcharge() { | |
global $woocommerce; | |
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) |
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_html', 'custom_price_suffix', 100, 2 ); | |
function custom_price_suffix( $price, $product ){ | |
$price = $price . ' +VAT'; | |
return apply_filters( 'woocommerce_get_price', $price ); | |
} |
OlderNewer