WooCommerce Meta Key Error

User
[Thu Jan 09 10:13:37.848629 2025] [proxy_fcgi:error] [pid 1255092] [client 2a02:c7c:8657:ce00:54f0:f4b3:568d:2717:0] AH01071: Got error 'lback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.; PHP message: is_internal_meta_key was called incorrectly. Generic add/update/get meta methods should not be used for internal meta data, including "total_sales". Use getters and setters. Backtrace: do_action('wp_ajax_nopriv_load_serchdata'), WP_Hook->do_action, WP_Hook->apply_filters, load_serchdata_callback, WC_Data->get_meta, WC_Data->is_internal_meta_key, wc_doing_it_wrong. This message was added in version 3.2.0.', referer: https://www.postmymeds.co.uk/treatments/weight-loss/buy-orlistat-120mg-capsules-generic-xenical/?srsltid=AfmBOopfxXgb9JTRdn2-AQ0_RcvANrI3aEeaTyn6KV0czGg-xqYyfX8c-GE
[Thu Jan 09 10:13:44.716930 2025] [proxy_fcgi:error] [pid 1251601] [client 83.104.72.82:0] AH01071: Got error 'PHP message: PHP Warning: filesize(): stat failed for /home/storm/sites/postmymeds-co-uk/public/wp-content/cache/w3-cache/all/351325a660b25474456af5c9a5606c4e/778e0718da28250fd4b94e336b99314d/c4ae3bab57ce981d51ef1581b25552b3/mob/preload_css.json in /home/storm/sites/postmymeds-co-uk/public/wp-content/plugins/w3speedster-wp/includes/core.php on line 874', referer: https://www.google.com/
Assistant
The error messages you're seeing in your logs point to two different issues related to your WordPress site:

1. **WooCommerce Meta Key Warning**:
– The warning about `is_internal_meta_key` indicates that there's a piece of code in your theme or a plugin that is trying to use generic add/update/get meta methods for an internal meta key, such as `total_sales`. This is discouraged in WooCommerce since internal keys should use their respective getters and setters.
– To resolve this, check the function `load_serchdata_callback`, which is being triggered during an AJAX call (likely when loading search data). Look for any calls to `get_meta` on a `WC_Data` object (like a product) for the `total_sales` key. Instead of using `get_meta`, you should use the appropriate getter method, such as `get_total_sales()`.

2. **Filesize Warning**:
– The second error indicates a warning about `filesize()` failing because it cannot find the specified file. This could happen if the W3Speedster cache file doesn't exist or has been deleted.
– To troubleshoot this, check if the cache directory exists and is writable by the web server. You can also try regenerating the cache by clearing the cache from the W3Speedster plugin settings. If the issue persists, you may want to check for updates or conflicts with other plugins.

### Next Steps:
– **For the WooCommerce Warning**: Update the code in your theme or custom plugin to replace the incorrect `get_meta` calls with the proper getters.
– **For the Filesize Warning**: Ensure the cache directory is correctly set up, and try clearing the cache through the W3Speedster settings.

If you need further assistance with specific code adjustments, feel free to share the relevant code snippets!

Leave a Comment

Your email address will not be published. Required fields are marked *