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
remove_filter( 'woocommerce_default_address_fields', 'get_default_address_fields', 10, 1 ); | |
add_filter( 'woocommerce_default_address_fields', 'updated_get_default_address_fields', 10, 1 ); | |
function updated_get_default_address_fields() { | |
global $woocommerce; | |
$fields = array( | |
'first_name' => array( | |
'label' => __( 'First Name', 'woocommerce' ), | |
'required' => true, | |
'class' => array( 'form-row-first' ), | |
), |
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 | |
/** | |
* "Friendlier, Safer WordPress Admin Areas" | |
* Presented by Cliff Seal at WordCamp Atlanta 2015 and Asheville 2016 | |
* Slides: http://www.slideshare.net/cliffseal/wp-admin | |
* | |
* Plugin Name: A Better Admin Experience | |
* Plugin URI: http://evermoresites.com | |
* Description: Cleans up and sanitizes the WordPress admin area | |
* Version: 1.0 |
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 | |
// rename the "Have a Coupon?" message on the checkout page | |
function woocommerce_rename_coupon_message_on_checkout() { | |
return 'Have a Promo Code?' . ' <a href="#" class="showcoupon">' . __( 'Click here to enter your code', 'woocommerce' ) . '</a>'; | |
} | |
add_filter( 'woocommerce_checkout_coupon_message', 'woocommerce_rename_coupon_message_on_checkout' ); | |
// rename the coupon field on the checkout page |
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
/** | |
* Remove postcode requirement if billing or shipping country is Ireland | |
* Add to your theme functions.php file | |
*/ | |
add_action( 'woocommerce_checkout_process', 'custom_country_check' ); | |
function custom_country_check(){ | |
global $woocommerce; | |