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_action('woocommerce_after_checkout_validation', 'deny_pobox_postcode'); | |
function deny_pobox_postcode( $posted ) { | |
global $woocommerce; | |
// Put postcode, address 1 and address 2 into an array | |
$check_address = array(); | |
$check_address[] = isset( $posted['shipping_postcode'] ) ? $posted['shipping_postcode'] : $posted['billing_postcode']; | |
$check_address[] = isset( $posted['shipping_address_1'] ) ? $posted['shipping_address_1'] : $posted['billing_address_1']; | |
$check_address[] = isset( $posted['shipping_address_2'] ) ? $posted['shipping_address_2'] : $posted['billing_address_2']; |
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
Need to include Modernizer (http://www.modernizr.com/) and jQuery (http://jquery.com/) | |
$(document).ready(function($){ | |
if (Modernizr.localstorage) { | |
$('#hide-button').click(function(e){ | |
localStorage.setItem('subscribed',true); | |
$('#sign-up-form,#hide-button').hide(); | |
$('#hide-button').hide(); |