Skip to content

Instantly share code, notes, and snippets.

View cryptexvinci's full-sized avatar
🏆
Focusing

Towhid cryptexvinci

🏆
Focusing
  • Ultimate Member Group Ltd
  • Bangladesh
View GitHub Profile
@cryptexvinci
cryptexvinci / woocommerce_checkout_required.php
Created March 13, 2017 16:40
Make the required checkout fields optional.
// WooCommerce Remove Required Checkout Fields
add_filter( 'woocommerce_checkout_fields' , 'custom_wc_checkout_fields_required' );
function custom_wc_checkout_fields_required( $fields ) {
$fields['billing']['billing_phone']['required'] = false;
return $fields;
}
@cryptexvinci
cryptexvinci / reorder-checkout.php
Created March 29, 2017 03:01
re-order WooCommerce Checkout Fields
add_filter( 'woocommerce_checkout_fields', 'custom_move_checkout_fields' );
function custom_move_checkout_fields( $fields ) {
// Lets display the email first. You can move these around depending on your needs.
$billing_order = array(
"billing_email",
"billing_first_name",
"billing_last_name",
"billing_company",
@cryptexvinci
cryptexvinci / storefront-homepage.css
Created September 6, 2017 05:43
Storefront Homepage section class
.storefront-product-categories{}
.storefront-recent-products{}
.storefront-featured-products{}
.storefront-popular-products{}
.storefront-on-sale-products{}
.storefront-best-selling-products{}
@cryptexvinci
cryptexvinci / storefront-homepage.css
Last active September 6, 2017 05:52
Set storefront homepage featured product background image.
.storefront-featured-products{
background-image: url(http://www.storefront.atlantisthemes.com/wp-content/uploads/2017/08/Featured-pattern.png);
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
-o-background-size: cover;
}
@cryptexvinci
cryptexvinci / storefront-homepage.css
Created September 6, 2017 06:00
Set sotefront homepage section background color.
.storefront-featured-products{
background-color:#FFEB3B;
}
@cryptexvinci
cryptexvinci / storefront-homepage.css
Created September 6, 2017 06:22
Hide Storefront Homepage recent products section title.
.storefront-recent-products .section-title {display:none;}
@cryptexvinci
cryptexvinci / storefront-homepage-filter.php
Created September 6, 2017 06:36
Storefront homepage section filters
storefront_product_categories_args
storefront_recent_products_args
storefront_featured_products_args
storefront_popular_products_args
storefront_on_sale_products_args
storefront_best_selling_products_args
@cryptexvinci
cryptexvinci / storefront-featured-title.php
Created September 6, 2017 07:41
Change storefront featured product section title
@cryptexvinci
cryptexvinci / storefront-homepage-number.php
Created September 6, 2017 07:47
Change Storefront Homepage section number of products.
add_filter('storefront_featured_products_shortcode_args','custom_storefront_featured_product_per_page' );
// Featured Featured Products per page
function custom_storefront_featured_product_per_page( $args ) {
$args['per_page'] = 10;
return $args;
}
@cryptexvinci
cryptexvinci / storefront-home-column.php
Last active September 6, 2017 07:49
Change number of products per column.
add_filter('storefront_featured_products_shortcode_args','custom_storefront_featured_product_per_row' );
// Featured Featured Products column
function custom_storefront_featured_product_per_row( $args ) {
$args['columns'] = 2;
return $args;
}