Skip to content

Instantly share code, notes, and snippets.

@Barnabas2
Barnabas2 / .htaccess
Created September 23, 2022 14:05 — forked from Zodiac1978/.htaccess
Make your Website faster - a safe htaccess way
#
# Sources:
# http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites
# http://codex.wordpress.org/Output_Compression
# http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086
# http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/
# http://gtmetrix.com/configure-entity-tags-etags.html
# http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014
# http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress
# https://andreashecht-blog.de/4183/
@Barnabas2
Barnabas2 / WooCommerce add box weight at checkout
Last active September 13, 2021 05:51
WooCommerce add box weight at checkout
/* The following method allows to add the weight of the packing at the checkout by dividing
the weight of your packing to the cart items. In this way the
the total cart weight includes the box weight and the shipping
options can reflect the correct prices for the total aclual order weight*/
//Case scenario for selling books
//Adjust code per your needs
add_action( 'woocommerce_before_calculate_totals', 'add_custom_weight', 10, 1 );