Hide Amount of Items from Add to Cart Message in WooCommerce
…the below code snippet to your functions.php https://gist.github.com/neilgee/e037ee587b318a7e7369359ec48c39d6 On line 24 a ternary operator has been removed which displayed the quantity if greater than 1 – now when you add…
Read MoreWooCommerce Accordion Style Expand/Collapse Product Category Menu
…a link to the child category archive page. I have come across the original code (which I have modified) on a site with no credit/author reference. The toggle icons have…
Read MoreSend Full Product Details over WooCommerce Webhook Action Hook
…https://gist.github.com/neilgee/5f60654d2583895e154729384cb51331#file-webhook-php Using this function and changing the webhook ID and data source will now return the full data to the webhook. Where to find webhook ID Now the full order…
Read MoreAdding Cloudflare to the mix of ServerPilot and fail2ban
…latest one on github from fail2ban 0.11.2 works fine. https://gist.github.com/neilgee/9e89fced25ee515876dee125758330a4 You just rename/backup the old cloudflare.conf and add in the new one above and add in your Cloudflare username/email and…
Read MoreSort WooCommerce products from product category to be last in cart order
…to be last order in cart * @link https://stackoverflow.com/questions/65800801/sort-specific-product-category-cart-items-at-the-end-in-woocommerce */ function product_category_cart_items_sorted_end() { $category_terms = __(‘box’); // Here set your category terms (can be names, slugs or Ids) $items_in_category =…
Read MoreChanging the Modern Tribe Events Date Format
…output. https://gist.github.com/neilgee/d67ff7310441b680e1d0ad575994b330 It is a shortcode [all_the_single_dates] that outputs the dates like so …. 09 – 14 September 2018 28 October – 02 November 2018 17 October 2018 So ……
Read MoreCreate a WooCommerce Featured Products Loop of Featured Images
…backend of the WooCommerce products, ‘featured‘ it is a term that belongs to the taxonomy named ‘product_visibility‘. https://gist.github.com/neilgee/21cafcbb2037617158a56adb7b727a78 So in the above a shortcode is created; [woo_featured_products] ready…
Read MoreInstalling WordPress wp-cli on macOS
…as: wp help plugin Using the wp-cli Completion Script It is also a good idea to use the wp-cli bash completion script so you can tab complete commands. Download the…
Read MoreSort WooCommerce products in cart order by price
…array. add_action( ‘woocommerce_cart_loaded_from_session’, ‘prefix_cart_order_prod_cat’ ); /** * WooCommerce – sort cart order by price * @link https://stackoverflow.com/questions/17194899/woocommerce-cart-page-display-products-order-by-product-price/57136404#57136404 */ function prefix_cart_order_prod_cat() { $products_in_cart = array(); // Assign each product’s price to…
Read More