How to enable products and other post types in Divi Search Module
WooCommerce Tips
Add a second password field to the checkout page in WooCommerce.
How to enable products and other post types in Divi Search Module
Increase cart item prices based on payment method in WooCommerce.
How to enable products and other post types in Divi Search Module
Change COD default order status to “On Hold” instead of “Processing” in Woocommerce
How to enable products and other post types in Divi Search Module
Disable the WooCommerce automatic image regeneration in the background.
How to enable products and other post types in Divi Search Module
Make “Create an account” to be default Checked on WooCommerce checkout page.
How to enable products and other post types in Divi Search Module
Remove related products output on WooCommerce product pages.
How to enable products and other post types in Divi Search Module
Adding text before order the information text “Thank you. Your order has been received.” in WooCommerce
How to enable products and other post types in Divi Search Module
Add the Add to Cart buttons on WooCommerce shop pages.
How to enable products and other post types in Divi Search Module
Remove the product image rollover on WooCommerce product pages.
How to enable products and other post types in Divi Search Module
Add product SKUs to default WP search
How to enable products and other post types in Divi Search Module
Enable products and other post types in Divi Search Module
How to enable products and other post types in Divi Search Module
Hide the product weight and dimension on the WooCommerce single product page.
Hide the product weight and dimension on the WooCommerce single product page.
Replace WooCommerce category images with plain text.
Sometimes itโs a pain to make images for all your WooCommerce product categories. Otherwise, you get the ugly default image. For example, see the image below where each category displays text only with a blue background. Add the CSS below to hide the category image and style how you want the category names appear. li.product-category a { padding-top:15px; padding-bottom:15px; }…
Make the default Divi search box search WooCommerce products only
If you have a Divi/WooCommerce site and you donโt have any posts, this is perfect for you. The default Divi search will now search only your products. You can add this to the Divi theme options Integration tab in the head. Or add to a Code module in your global header. This also changes the placeholder text from โSearchโ to โSearch Productsโ. For example when you click on the search icon like…
How to add display Woocommerce product category on the order edit page
Add the following PHP code to your child theme functions.php file. get_id(), โproduct_catโ ); if(!empty($termsp)){ foreach ($termsp as $term) { $_categoryid = $term->term_id; if( $term = get_term_by( โidโ, $_categoryid, โproduct_catโ ) ){ echo $term->name .โ, โ; } } }
Enlarge product image on rollover for Divi Shop module
Add the following CSS code to the Divi theme options area or your child theme style.css file. /* enlarge shop module product images on rollover BEGIN */ .et_shop_image img {transition: transform .2s;} .et_shop_image img:hover {transform: scale(1.25);} /* enlarge shop module product images on rollover END */
Change the default U.S. state in the dropdown on WooCommerce checkout page
Add the following PHP code to your child theme functions.php file. //default checkout US state dropdown blank instead of the default site state making taxes sometimes show up add_filter( ‘default_checkout_billing_state’, ‘change_default_checkout_state’ ); add_filter( ‘default_checkout_shipping_state’, ‘change_default_checkout_state’ ); function change_default_checkout_state() { return ”; //set…
How to Change In Stock text in WooCommerce
Add the following PHP code to your child theme functions.php file. /* Change In Stock text in WooCommerce */ add_filter( ‘woocommerce_get_availability’, ‘wcs_custom_get_availability’, 1, 2); function wcs_custom_get_availability( $availability, $_product ) { // Change In Stock Text if ( $_product->is_in_stock() ) { $availability[’availability’] = __(‘Available!’, ‘woocommerce’); }…
Move email form to top of WooCommerce checkout page
Add the following PHP code to your child theme functions.php file. /* Move email form to top of Woocommerce checkout page */ add_filter( ‘woocommerce_billing_fields’, ‘custom_woo_move_checkout_email_field’, 10, 1 ); function custom_woo_move_checkout_email_field( $address_fields ) { $address_fields[’billing_email’][’priority’] = 5; return $address_fields; }
Hide Coupon Code Area on WooCommerce Cart Page
Add the following PHP code to your child theme functions.php file. // hide coupon field on the cart page function disable_coupon_field_on_cart( $enabled ) { if ( is_cart() ) { $enabled = false; } return $enabled; } add_filter( ‘woocommerce_coupons_enabled’, ‘disable_coupon_field_on_cart’ );
Show Product Thumbnail on WooCommerce Checkout Page
Add the following PHP code to your child theme functions.php file. /** * Show product thumbnail on checkout page. * * @see {templates|woocommerce}/checkout/review-order.php */ add_filter( ‘woocommerce_cart_item_name’, ‘jfs_checkout_show_product_thumbnail’, 10, 2 ); function jfs_checkout_show_product_thumbnail( $name, $cart_item ) { if ( ! is_checkout() ) return $name; $thumbnail = ‘<span…
How to delay WooCommerce Emails
You may find this helps speed up the checkout process by delaying the WooCommerce order emails from sending immediately at checkout. Add the following PHP code to your child theme functions.php file. // delay woocommerce emails add_filter( ‘woocommerce_defer_transactional_emails’, ‘__return_true’ );
Add the Add to Cart button to WooCommerce Shop and Category pages
Add the following to your child theme functions.php file. // Add Add to Cart buttons to shop pages add_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 20 );
eCommerce with WooCommerce and WordPress – What you need to know
Here are some thoughts, ideas and tips that may help you on the way to building your own eCommerce website with WooCommerce and WordPress. What does it cost? I guess it comes down to the level of game you want to play. If you want to do things on the cheap, then expect to get a similar ROI. When I say cheap, Iโm talking about $1,000 or less. If you cannot budget at least $2,000 to build an…
How to customize WooCommerce messages on cart and checkout pages
Add the following CSS in the Divi theme options area and customize however you like. .woocommerce-error, .woocommerce .woocommerce-error, .woocommerce-info, .woocommerce .woocommerce-info, .woocommerce-message, .woocommerce .woocommerce-message { padding: 1em 2em 1em 3.5em !important; margin: 0 0 2em !important; position: relative !important; background-color: #f7f6f7 !important; background:…
How to change “Create an account” text in WooCommerce / WordPress
If you want to change the text that appears on things like the WooCommerce โcreate an accountโ. You can use the same code and replace the variable โwoocommerceโ for other items. Try the simple code below and it may work for you. Add the function below to your child theme functions.php file. // change text from Create an account? function my_text_strings( $translated_text, $text, $domain ) {…
How to change the word “Sale” on the WooCommerce sale badge
Add the function below to your child theme functions.php file. // change Sale to Save on the sale badge add_filter( โwoocommerce_sale_flashโ, โwc_custom_replace_sale_textโ ); function wc_custom_replace_sale_text( $html ) { return str_replace( __( โSale!โ, โwoocommerceโ ), __( โSave!โ, โwoocommerceโ ), $html ); }
How to uncheck Ship to a different address on checkout page
Itโs hard to believe this actually needs to be done. Add the function below to your child theme functions.php file. // uncheck Ship to a different address? on checkout page add_filter( โwoocommerce_ship_to_different_address_checkedโ, โ__return_falseโ );
How to replace Howdy message in WordPress
Iโm guessing someone in Texas had something to do with the word โHowdyโ being the welcome prefix in WordPress. Itโs easy enough to change. Add the function below to your child theme functions.php file. /* replacing Howdy with Hello */ function howdy_message($translated_text, $text, $domain) { $new_message = str_replace(โHowdyโ, โHelloโ, $text); return $new_message; } add_filter(โgettextโ,…
How to add search fields to WooCommerce orders page
You may find it useful to have additional search fields in the WooCommerce orders page in the WP admin area. Add the function below to your child theme functions.php file. /* add search fields to woocommerce orders page Allowed search fields: _order_key _billing_first_name _billing_last_name _billing_company _billing_address_1 _billing_city _billing_postcode _billing_country _billing_state…
How to prevent hidden WooCommerce products from showing up in WordPress search results
Add the function below to your child theme functions.php file. /* Preventing Hidden WooCommerce products from showing up in WordPress search results */ if ( ! function_exists( โgamma_search_query_fixโ ) ){ function gamma_search_query_fix( $query = false ) { if(!is_admin() && is_search()){ $query->set( โmeta_queryโ, array( โrelationโ => โORโ, array( โkeyโ => โ_visibilityโ, โvalueโ =>…
How to move WooCommerce category description to bottom of page
For SEO reasons you should have good text on your WooCommerce category pages. But, you may want to display your products first. Add the function below to your child theme functions.php file. // move category description to bottom of pages remove_action( ‘woocommerce_archive_description’, ‘woocommerce_taxonomy_archive_description’, 10 ); add_action( ‘woocommerce_after_shop_loop’,…
How to add Order Again button to WooCommerce My Account / Previous Orders page
Add the function below to your child theme functions.php file. /** * Add order again button in my orders actions. * * @param array $actions * @param WC_Order $order * @return array */ function cs_add_order_again_to_my_orders_actions( $actions, $order ) { if ( $order->has_status( โcompletedโ ) ) { $actions[โorder-againโ] = array( โurlโ => wp_nonce_url( add_query_arg( โorder_againโ, $order->id…
How to remove product image rollover on WooCommerce product pages
Add the function below to your child theme functions.php file. // removing the product image rollover function remove_product_zoom_support() { remove_theme_support( โwc-product-gallery-zoomโ ); } add_action( โwpโ, โremove_product_zoom_supportโ, 100 );
How to add alt tags to WooCommerce product images
Add the function below to your child theme functions.php file. // adding alt tags to product images add_filter(โwp_get_attachment_image_attributesโ, โchange_attachement_image_attributesโ, 20, 2); function change_attachement_image_attributes( $attr, $attachment ){ // Get post parent $parent = get_post_field( โpost_parentโ, $attachment); // Get post type to check if itโs product $type =…
How to update WooCommerce order status to processing when an order is placed using PayPal
How to update WooCommerce order status to processing when an order is placed using PayPal. Add the following PHP code to your child theme functions.php file. function update_wc_order_status($posted) { $order_id = isset($posted[’invoice’]) ? $posted[’invoice’] : ”; if(!empty($order_id)) { $order = new WC_Order($order_id); $order-&gt;update_status(‘processing’); } }…
How to change the “Proceed to PayPal” button text on the WooCommerce checkout screen
The default PayPal buttons says โProceed to PayPalโ. You may want to change this to something else like โContinue to Payโ or whatever you like. Add the following PHP code to your child theme functions.php file. add_filter( ‘gettext’, ‘custom_paypal_button_text’, 20, 3 ); function custom_paypal_button_text( $translated_text, $text, $domain ) { switch ( $translated_text ) { case ‘Proceed to…