This will update the final meta descriptions fix with improved WooCommerce detection.

\’ . “\\n”;\n echo \’\’ . “\\n”;\n echo \’\’ . “\\n”;\n }\n}\n\n// Remove the old plugin first\nremove_action(\’wp_head\’, \’final_meta_descriptions_fix\’, 1);\n\n// Hook with highest priority\nadd_action(\’wp_head\’, \’updated_final_meta_descriptions_fix\’, 1);\n\n// Also hook after WooCommerce initialization\nadd_action(\’woocommerce_init\’, function() {\n add_action(\’wp_head\’, \’updated_final_meta_descriptions_fix\’, 1);\n});\n?>’;

// Update the plugin file
$result = file_put_contents($mu_plugin_dir . ‘final-meta-fix.php’, $plugin_content);

if ($result !== false) {
echo ‘

SUCCESS: Updated Final Meta Fix plugin with improved WooCommerce detection!

‘;
echo ‘

The updated plugin now uses multiple detection methods for WooCommerce pages:

‘;
echo ‘

    ‘;
    echo ‘

  • Homepage: Experience the ultimate Stinky Fish Challenge…
  • ‘;
    echo ‘

  • Shop: Buy authentic Swedish Surströmming…
  • ‘;
    echo ‘

  • Cart: Review your Surströmming order…
  • ‘;
    echo ‘

  • Checkout: Complete your Surströmming purchase…
  • ‘;
    echo ‘

  • My Account: Manage your Stinky Fish Challenge account…
  • ‘;
    echo ‘

‘;
echo ‘

Detection methods: URL path matching, WordPress conditionals, and page ID matching

‘;
} else {
echo ‘

ERROR: Could not update plugin file.

‘;
}
}
else {
echo ‘

Update Final Meta Fix Plugin

‘;
echo ‘

This will update the plugin with improved WooCommerce page detection.

‘;
}
?>