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 | |
// See: | |
add_filter( 'woocommerce_default_address_fields', function( $fields ) { | |
$fields['first_name']['custom_attributes']['data-parsley-multiple-of'] = '3'; | |
return $fields; | |
}, 100000 + 100 ); |
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_filter( | |
'woocommerce_default_address_fields', | |
function( $fields ) { | |
$fields['phone']['label'] = 'Mobile Phone'; | |
$fields['phone']['placeholder'] = 'Mobile Phone'; | |
return $fields; | |
}, 100000 + 100 | |
); |
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 to your child theme's functions.php file or to WP Admin > CheckoutWC > Advanced > PHP Snippets | |
// Do NOT include opening PHP tag above (<?php) | |
// Cart item thumbnail width | |
// Default: 60 | |
add_filter( | |
'cfw_cart_thumb_width', | |
function( $width ) { |
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 to funcions.php or to WP Admin > CheckoutWC > Advanced > PHP Snippets | |
// Do NOT include opening PHP tag above (<?php) | |
add_filter( | |
'cfw_form_attributes', | |
function( $attributes, $id ) { | |
// Only add our attribute on the checkout page, | |
// not the order pay page. Order Pay form ID is order_review |
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
--cfw-heading-font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; | |
--cfw-body-font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; | |
--cfw-body-background-color: #fff; | |
--cfw-body-text-color: #666; | |
--cfw-body-link-color: #0073aa; | |
--cfw-header-background-color: #fff; | |
--cfw-header-text-color: #2b2b2b; | |
--cfw-header-bottom-margin: 0; | |
--cfw-footer-background-color: #fff; | |
--cfw-footer-text-color: #999; |
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 to functions.php or to CheckoutWC > Advanced > PHP Snippets | |
// You can also use the Code Snippets plugin | |
// Do NOT include opening PHP tag above (<?php) | |
/** | |
* Set a minimum order amount for checkout | |
*/ | |
add_action( 'woocommerce_checkout_process', 'wc_prevent_orders_under_minimum' ); | |
add_action( 'woocommerce_before_cart', 'wc_cart_minimum_order_amount' ); |
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 to functions.php or to CheckoutWC > Advanced > PHP Snippets | |
// Do NOT include opening PHP tag above (<?php) | |
/** | |
* Suggested locations | |
* - cfw_checkout_main_container_start: Above the breadcrumbs on every step | |
* - cfw_checkout_before_shipping_methods: Above the shipping methods list | |
* - cfw_checkout_payment_method_tab (Priority 9): Above the payment methods | |
*/ |