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 | |
/* | |
* 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 | |
/* | |
*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 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 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 | |
//flatsome on_sale product custom text | |
function display_text_product_box_after() { | |
global $product; | |
if ( $product->is_on_sale() ) | |
{ | |
echo '<b style="color:red">Limited time offer</b>'; | |
} |
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 | |
//flatsome display text after product detail page image, if product is on sale | |
function display_flatsome_after_product_images() { | |
global $product; | |
if ( $product->is_on_sale() ) | |
{ | |
echo '<div style="color:red; border:1px solid #ccc;">Limited time offer</div>'; | |
} |
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 | |
//flatsome product detail page text after excerpt | |
function display_after_short_description($excerpt) { | |
$add_to_excerpt = $excerpt . "<p style='color:green'>Add anything after excerpt</p>"; | |
return $add_to_excerpt; | |
} |
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 | |
//display data in cart item table | |
function display_data_in_cart_item_table( $product_name, $cart_item, $cart_item_key ) { | |
$categories = wc_get_product_category_list( $cart_item['product_id']); | |
$product_sku = get_post_meta($cart_item['product_id'] , '_sku', true); | |
$product_name = $product_name . '<dl style="border:2px solid red;padding:10px;"> | |
<dt>Category : </dt> |