A collection of essential Git commands for managing your code repositories efficiently.
Check current configuration:
git config --listThis code snippet overrides the WooCommerce Price Per Unit plugin to exclude unit price for products in the your-category category. It dynamically removes the unit price display for specific products based on their category.
functions.php file or a custom plugin.$excluded_categories array if needed to match your specific category slugs.| SELECT 'autoloaded data in KiB' as name, ROUND(SUM(LENGTH(option_value))/ 1024) as value FROM wp_options WHERE autoload='yes' | |
| UNION | |
| SELECT 'autoloaded data count', count(*) FROM wp_options WHERE autoload='yes' | |
| UNION | |
| (SELECT option_name, length(option_value) FROM wp_options WHERE autoload='yes' ORDER BY length(option_value) DESC LIMIT 10) |
| ######################################################################## | |
| # OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.4 - 05/2022 | |
| # ---------------------------------------------------------------------- | |
| # @Author: Andreas Hecht | |
| # @Author URI: https://seoagentur-hamburg.com | |
| # License: GNU General Public License v2 or later | |
| # License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
| ######################################################################## | |
| <?php //<~ don't add me in | |
| add_filter( 'woocommerce_get_price_html', 'wb_change_product_html' ); | |
| // Change and return $price_html variable using the $price and weight amount | |
| function wb_change_product_html( $price ) { | |
| $price_html = '<span class="amount">' . $price . ' per kg </span>'; // change weight measurement here | |
| return $price_html; | |
| } |