This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Version 2024-04-28 | |
// For support email info@microbite.com.au | |
// Bricks - Woo product schema | |
function update_price_valid_until() { | |
$currentDate = date('Y-m-d'); | |
$priceValidUntil = get_option('woocommerce_price_valid_until'); | |
if (empty($priceValidUntil) || $currentDate >= $priceValidUntil) { | |
$priceValidUntil = date('Y-m-d', strtotime('+6 months')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Microbite WebP Converter | |
* | |
* Automatically converts uploaded images (JPEG, PNG, GIF, HEIC) to optimized WebP format. | |
* This snippet is perfect for handling large image uploads - it intelligently resizes images | |
* to your specified dimensions and converts them to WebP for maximum compression while | |
* maintaining quality. Original files are replaced with optimized versions to save server space. | |
* |