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 | |
//remove flatsome woocommerce shop page product category | |
remove_action('woocommerce_shop_loop_item_title','flatsome_woocommerce_shop_loop_category', 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 | |
/* | |
* remove checkout field in Woocommerce | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'ci_woo_checkout_fields' ); | |
function ci_woo_checkout_fields( $fields ) { | |
unset($fields['billing']['billing_first_name']); // remove the customer's First Name for billing |
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 | |
/* | |
*remove Order Notes from checkout field in Woocommerce | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'ci_woo_checkout_fields' ); | |
function ci_woo_checkout_fields( $fields ) { | |
unset($fields['order']['order_comments']); | |
return $fields; | |
} |
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 | |
/* | |
* Remove some checkout billing fields | |
*/ | |
function ci_woo_billing_fields($fields){ | |
unset( $fields["billing_country"] ); | |
unset( $fields["billing_company"] ); | |
unset( $fields["billing_address_1"] ); | |
unset( $fields["billing_address_2"] ); |
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 | |
/* | |
* Reorder WooCommerce Checkout Fields | |
*/ | |
function ci_woo_reorder_fields($fields) { | |
$fields['billing']['billing_first_name']['priority'] = 10; | |
$fields['billing']['billing_last_name']['priority'] = 20; | |
$fields['billing']['billing_email']['priority'] = 30; | |
$fields['billing']['billing_phone']['priority'] = 40; |
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 | |
/* | |
*Add WooCommerce checkout Custom shipping field | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'ci_custom_override_checkout_fields' ); | |
// Our hooked in function - $fields is passed via the filter! | |
function ci_custom_override_checkout_fields( $fields ) { | |
$fields['shipping']['shipping_fax'] = array( |
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 | |
/** | |
* Insert the new endpoint into the My Account menu. | |
* | |
* @param array $items | |
* @return array | |
*/ | |
function ci_custom_account_menu_items( $items ) { | |
// Remove the logout menu item. | |
$logout = $items['customer-logout']; |
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 | |
/* | |
* Notification on order processing to cancelled status change | |
*/ | |
function ci_cancelled_notification( $order_id ) { | |
$order = wc_get_order( $order_id ); | |
// load the mailer class |
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 | |
/* | |
update cart on quantity field value change | |
*/ | |
add_action( 'wp_footer', 'wc_qty_change_update_cart' ); | |
function wc_qty_change_update_cart() { | |
if (is_cart()) : | |
?> |
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 | |
/* | |
update checkout on billing postcode field blur | |
*/ | |
function wc_field_blur_update_checkout(){?> | |
<script> | |
jQuery("#billing_postcode").blur(function(){ | |
jQuery( 'body' ).trigger( 'update_checkout' ); |