// Remove ALL private/system notes BEFORE Lightspeed syncs
add_filter('woocommerce_new_order_note_data', function($data) {

    // Kill WooPayments / fee / stock / system notes
    $blocked_keywords = [
        'Fee details',
        'Base fee',
        'Net payout',
        'WooPayments',
        'Stock levels reduced',
        'payment was successfully charged',
        'Payment via Card',
        'Stock hold'
    ];

    foreach ($blocked_keywords as $keyword) {
        if (stripos($data['comment_content'], $keyword) !== false) {
            return false; // STOP note from being created
        }
    }

    return $data;

}, 1);
// Add CLEAN delivery info note (what Lightspeed WILL import)
add_action('woocommerce_checkout_update_order_meta', function($order_id) {

    $date = get_post_meta($order_id, '_delivery_date', true);
    $time = get_post_meta($order_id, '_time_slot', true);

    if ($date || $time) {
        $note = "DELIVERY INFO:\n";

        if ($date) {
            $note .= "Date: " . $date . "\n";
        }

        if ($time) {
            $note .= "Time: " . $time;
        }

        $order = wc_get_order($order_id);
        $order->add_order_note($note, false); // FALSE = customer-visible note (important!)
    }

}, 5);<?xml version="1.0" encoding="UTF-8"?>
<!--generator='jetpack-15.7'-->
<!--Jetpack_Sitemap_Buffer_Master_XMLWriter-->
<?xml-stylesheet type="text/xsl" href="//garciaswarehouse.com/sitemap-index.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <sitemap>
  <loc>https://garciaswarehouse.com/sitemap-1.xml</loc>
  <lastmod>2026-04-08T23:10:23Z</lastmod>
 </sitemap>
 <sitemap>
  <loc>https://garciaswarehouse.com/image-sitemap-1.xml</loc>
  <lastmod>2026-04-07T20:27:02Z</lastmod>
 </sitemap>
</sitemapindex>
