wc_doing_it_wrong()
-
Hello everybody.
I’m getting a lot of these error when debug the page. about 140 each page I test
Function id was called incorrectly. Coupon properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), include(‘/themes/flatsome-child/functions.php’), WC_Legacy_Coupon->__get, wc_doing_it_wrong (This message was added in version 3.0.)
caller:
wc_doing_it_wrong()
wp-content/plugins/woocommerce/includes/wc-deprecated-functions.php:120WC_Legacy_Coupon->__get()
wp-content/plugins/woocommerce/includes/legacy/class-wc-legacy-coupon.php:61
-
Hi @bcgels,
The error likely stems from using deprecated WooCommerce coupon methods, either in your theme (Flatsome), a custom code added to your site, or a plugin. It may be related to legacy code in custom or third-party plugins.
Please share your System Status Report so I can better understand your settings. You can get it by navigating to WooCommerce > Status > Get Report > Copy for support.
Also, create a staging site, change your theme to Storefront, and deactivate the Flatsome child theme and any plugins used by the Flatsome theme to see if the error persists.
WordPress Environment<br><br>WordPress address (URL): https://www.bcgel.co.uk<br>Site address (URL): https://www.bcgel.co.uk<br>WC Version: 9.6.0<br>Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.<br>Action Scheduler Version: ✔ 3.9.0<br>Log Directory Writable: ✔<br>WP Version: 6.7.1<br>WP Multisite: –<br>WP Memory Limit: 512 MB<br>WP Debug Mode: –<br>WP Cron: ✔<br>Language: en_GB<br>External object cache: ✔ Server Environment<br><br>Server Info: LiteSpeed<br>PHP Version: 8.2.27<br>PHP Post Max Size: 2 GB<br>PHP Time Limit: 600<br>PHP Max Input Vars: 2000<br>cURL Version: 7.76.1<br>OpenSSL/3.2.2<br><br>SUHOSIN Installed: –<br>MySQL Version: 10.6.19-MariaDB<br>Max Upload Size: 2 GB<br>Default Timezone is UTC: ✔<br>fsockopen/cURL: ✔<br>SoapClient: ✔<br>DOMDocument: ✔<br>GZip: ✔<br>Multibyte String: ✔<br>Remote Post: ✔<br>Remote Get: ✔ Database<br><br>WC Database Version: 9.6.0<br>WC Database Prefix: 3i0u1SAxA_<br>Total Database Size: 436.98MB<br>Database Data Size: 254.00MB<br>Database Index Size: 182.98MB<br>3i0u1SAxA_woocommerce_sessions: Data: 19.02MB + Index: 2.02MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_order_items: Data: 2.52MB + Index: 0.39MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_order_itemmeta: Data: 12.52MB + Index: 10.98MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_actionscheduler_actions: Data: 6.02MB + Index: 4.34MB + Engine InnoDB<br>3i0u1SAxA_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_actionscheduler_logs: Data: 4.02MB + Index: 3.03MB + Engine InnoDB<br>3i0u1SAxA_automatic_amazon_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_automatic_articles_keys: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_automatic_articles_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_automatic_cached: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_automatic_camps: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_automatic_categories: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_automatic_clickbank_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_automatic_general: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_automatic_keywords: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_automatic_links: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_automatic_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_automatic_youtube_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_cartflows_ca_cart_abandonment: Data: 2.50MB + Index: 0.08MB + Engine InnoDB<br>3i0u1SAxA_cartflows_ca_email_history: Data: 0.17MB + Index: 0.19MB + Engine InnoDB<br>3i0u1SAxA_cartflows_ca_email_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_cartflows_ca_email_templates_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_check_email_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_commentmeta: Data: 0.41MB + Index: 0.41MB + Engine InnoDB<br>3i0u1SAxA_comments: Data: 11.52MB + Index: 10.08MB + Engine InnoDB<br>3i0u1SAxA_duplicator_backups: Data: 0.02MB + Index: 0.13MB + Engine InnoDB<br>3i0u1SAxA_duplicator_entities: Data: 0.02MB + Index: 0.14MB + Engine InnoDB<br>3i0u1SAxA_duplicator_packages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_fsp_ai_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_ai_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_apps: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_channels: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_channel_labels: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_channel_labels_data: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_channel_permissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_channel_sessions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_data: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_planners: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_post_comments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fsp_schedules: Data: 0.36MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_accounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_account_access_tokens: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_account_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_account_groups_data: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_account_nodes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_account_node_status: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_account_sessions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_account_status: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_apps: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_feeds: Data: 0.08MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_grouped_accounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_post_comments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_fs_schedules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_gla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>3i0u1SAxA_ilj_linkindex: Data: 0.30MB + Index: 0.47MB + Engine InnoDB<br>3i0u1SAxA_ilj_linkindex_individual_temp: Data: 0.02MB + Index: 0.08MB + Engine InnoDB<br>3i0u1SAxA_jetpack_sync_queue: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>3i0u1SAxA_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_litespeed_img_optming: Data: 0.05MB + Index: 0.05MB + Engine InnoDB<br>3i0u1SAxA_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_mailerlite_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_member_catmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_ml_data: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_monsterinsights_user_journey: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_newsletter: Data: 1.52MB + Index: 0.28MB + Engine InnoDB<br>3i0u1SAxA_newsletter_automated: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_newsletter_automated_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_newsletter_emails: Data: 0.31MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_newsletter_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_newsletter_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_newsletter_sent: Data: 0.48MB + Index: 0.36MB + Engine InnoDB<br>3i0u1SAxA_newsletter_stats: Data: 0.44MB + Index: 0.25MB + Engine InnoDB<br>3i0u1SAxA_newsletter_user_logs: Data: 0.13MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_newsletter_user_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_options: Data: 6.30MB + Index: 1.66MB + Engine InnoDB<br>3i0u1SAxA_packlink_entity: Data: 5.50MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_portfolio_catmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_postmeta: Data: 67.61MB + Index: 61.19MB + Engine InnoDB<br>3i0u1SAxA_posts: Data: 5.52MB + Index: 3.42MB + Engine InnoDB<br>3i0u1SAxA_post_smtp_logmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_post_smtp_logs: Data: 36.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_product_catmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_rank_math_redirections_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_revslider_sliders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_revslider_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_sgpb_subscribers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_sgpb_subscription_error_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_snp_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_snp_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>3i0u1SAxA_swift_performance_image_optimizer: Data: 0.11MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_termmeta: Data: 1.52MB + Index: 3.03MB + Engine InnoDB<br>3i0u1SAxA_terms: Data: 0.16MB + Index: 0.16MB + Engine InnoDB<br>3i0u1SAxA_term_relationships: Data: 0.20MB + Index: 0.17MB + Engine InnoDB<br>3i0u1SAxA_term_taxonomy: Data: 0.14MB + Index: 0.16MB + Engine InnoDB<br>3i0u1SAxA_to_buffer_log: Data: 0.11MB + Index: 0.06MB + Engine InnoDB<br>3i0u1SAxA_trustindex_collector_schedule_list: Data: 1.52MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_trustindex_collector_unsubscribes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_trustindex_google_reviews: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_usermeta: Data: 6.52MB + Index: 8.02MB + Engine InnoDB<br>3i0u1SAxA_users: Data: 0.36MB + Index: 0.30MB + Engine InnoDB<br>3i0u1SAxA_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wc_customer_lookup: Data: 1.52MB + Index: 0.67MB + Engine InnoDB<br>3i0u1SAxA_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>3i0u1SAxA_wc_gpf_render_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_wc_orders: Data: 3.52MB + Index: 5.03MB + Engine InnoDB<br>3i0u1SAxA_wc_orders_meta: Data: 26.56MB + Index: 53.38MB + Engine InnoDB<br>3i0u1SAxA_wc_order_addresses: Data: 2.52MB + Index: 3.86MB + Engine InnoDB<br>3i0u1SAxA_wc_order_coupon_lookup: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>3i0u1SAxA_wc_order_operational_data: Data: 2.52MB + Index: 0.75MB + Engine InnoDB<br>3i0u1SAxA_wc_order_product_lookup: Data: 1.52MB + Index: 1.05MB + Engine InnoDB<br>3i0u1SAxA_wc_order_stats: Data: 1.52MB + Index: 0.80MB + Engine InnoDB<br>3i0u1SAxA_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>3i0u1SAxA_wc_product_attributes_lookup: Data: 0.05MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_wc_product_meta_lookup: Data: 0.09MB + Index: 0.17MB + Engine InnoDB<br>3i0u1SAxA_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wc_revolut_customer: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>3i0u1SAxA_wc_revolut_orders: Data: 0.06MB + Index: 0.09MB + Engine InnoDB<br>3i0u1SAxA_wc_revolut_temp_session: Data: 0.03MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_wc_webhooks: Data: 0.20MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_wlr_levels: Data: 0.02MB + Index: 0.08MB + Engine InnoDB<br>3i0u1SAxA_wlr_logs: Data: 0.22MB + Index: 0.06MB + Engine InnoDB<br>3i0u1SAxA_wlr_referral: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>3i0u1SAxA_wlr_users: Data: 0.06MB + Index: 0.08MB + Engine InnoDB<br>3i0u1SAxA_woobe_history: Data: 0.08MB + Index: 0.05MB + Engine InnoDB<br>3i0u1SAxA_woobe_history_bulk: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_gpf_google_taxonomy: Data: 1.52MB + Index: 0.13MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_woocommerce_takepayments_wallets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wpforms_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wpforms_payments: Data: 0.02MB + Index: 0.14MB + Engine InnoDB<br>3i0u1SAxA_wpforms_payment_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>3i0u1SAxA_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_wpr_above_the_fold: Data: 1.44MB + Index: 0.09MB + Engine InnoDB<br>3i0u1SAxA_wpr_lazy_render_content: Data: 0.08MB + Index: 0.09MB + Engine InnoDB<br>3i0u1SAxA_wpr_rocket_cache: Data: 0.25MB + Index: 0.39MB + Engine InnoDB<br>3i0u1SAxA_wpr_rucss_used_css: Data: 11.41MB + Index: 2.03MB + Engine InnoDB<br>3i0u1SAxA_wpstg_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_yith_wcwl: Data: 0.11MB + Index: 0.05MB + Engine InnoDB<br>3i0u1SAxA_yith_wcwl_lists: Data: 0.14MB + Index: 0.16MB + Engine InnoDB<br>3i0u1SAxA_yith_ywrac_email_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_yoast_indexable: Data: 1.52MB + Index: 0.64MB + Engine InnoDB<br>3i0u1SAxA_yoast_indexable_hierarchy: Data: 0.11MB + Index: 0.22MB + Engine InnoDB<br>3i0u1SAxA_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>3i0u1SAxA_yoast_primary_term: Data: 0.09MB + Index: 0.09MB + Engine InnoDB<br>3i0u1SAxA_yoast_prominent_words: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>3i0u1SAxA_yoast_seo_links: Data: 0.23MB + Index: 0.16MB + Engine InnoDB<br>3i0u1SAxA_yoast_seo_meta: Data: 0.16MB + Index: 0.00MB + Engine InnoDB<br>3i0u1SAxA_ywdpd_rules: Data: 0.02MB + Index: 0.03MB + Engine InnoDB Post Type Counts<br><br>amn_exact-metrics: 1<br>amn_wpforms-lite: 2<br>attachment: 1069<br>blocks: 5<br>custom_css: 2<br>fgf_master_log: 69<br>fgf_rules: 1<br>fs_post: 1<br>fs_post_tmp: 4<br>gfw_event: 2<br>gfw_report: 206<br>jetpack_migration: 2<br>jp_img_sitemap: 1<br>jp_sitemap: 1<br>jp_sitemap_master: 1<br>nav_menu_item: 95<br>oembed_cache: 11<br>page: 18<br>popupbuilder: 4<br>post: 26<br>product: 516<br>revision: 3<br>rm_content_editor: 1<br>shop_coupon: 152<br>shop_order: 8777<br>shop_order_refund: 130<br>sidebar: 1<br>snp_popups: 1<br>user_request: 1<br>ux_template: 3<br>wcb: 1<br>wccaf: 2<br>wcccf: 3<br>wp_global_styles: 1<br>wp_navigation: 1<br>wpcf7_contact_form: 1<br>wpcode: 7<br>wpforms: 1<br>wysijap: 1<br>yith_wcan_preset: 2<br>ywdpd_discount: 2<br>ywrac_email: 4 Security<br><br>Secure connection (HTTPS): ✔<br>Hide errors from visitors: ✔ Active Plugins (44)<br><br>Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.5<br>Classic Editor: by WordPress Contributors – 1.6.7<br>Contact Form 7: by Takayuki Miyoshi – 6.0.3<br>Customer Reviews Collector for WooCommerce: by Trustindex.io – 4.5<br>Disable Bloat for WordPress & WooCommerce: by Disable Bloat – 3.4.9<br>GTM4WP - A Google Tag Manager (GTM) plugin for WordPress: by Thomas Geiger – 1.20.3<br>Facebook for WooCommerce: by Facebook – 3.3.2<br>Flexible Shipping: by Octolize – 5.1.3<br>Free Gifts for WooCommerce: by Flintop – 11.5.0<br>FS Poster: by FS Code – 7.1.5<br>Gutenberg: by Gutenberg Team – 20.1.0<br>WPCode Lite: by WPCode – 2.2.5<br>Internal Link Juicer: by TeamUpdraft – 2.24.6<br>LitCommerce: by LitCommerce – 1.2.5<br>Microsoft Advertising Universal Event Tracking (UET): by Microsoft Corporation – 1.0.7<br>Packlink PRO Shipping: by Packlink Shipping S.L. – 3.4.13<br>Paid On Results - WooCommerce: by Paid On Results – 3.0.3<br>Perfect Brands WooCommerce: by QuadLayers – 3.4.9<br>Post SMTP: by Post SMTP – 3.0.1<br>Query Monitor: by John Blackbourn – 3.17.0<br>Redis Object Cache: by Till Krüss – 2.5.4<br>Shoparize Partner: by Shoparize – 1.0.7<br>Simple Cloudflare Turnstile: by Elliot Sowersby<br>RelyWP – 1.29.0<br><br>TAG Integration: by TAG – 1.0<br>Trustpilot-reviews: by Trustpilot – 2.5.925<br>UpdraftPlus - Backup/Restore: by TeamUpdraft<br>DavidAnderson – 2.25.1.0<br><br>WooCommerce Cart Abandonment Recovery: by CartFlows Inc – 1.3.1<br>Takepayments CS Payment Gateway: by – 2.0.95<br>WooCommerce PayPal Payments: by WooCommerce – 2.9.6<br>PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 3.9.6<br>WooCommerce Google Product Feed: by Ademti Software Ltd. – 11.0.13 (update to version 11.0.18 is available)<br>WooCommerce: by Automattic – 9.6.0<br>Yoast SEO Premium: by Team Yoast – 24.1<br>Yoast SEO: by Team Yoast – 24.3<br>WP Crontrol: by John Blackbourn – 1.18.0<br>WP File Manager: by mndpsingh287 – 8.0.1<br>Widgets for Google Reviews: by Trustindex.io – 12.5<br>WP Rocket: by WP Media – 3.17.4<br>WP STAGING PRO - Backup Duplicator & Migration: by WP-STAGING – 5.7.1<br>WP STAGING WordPress Backup Plugin - Backup Duplicator & Migration: by WP-STAGING<br>WPStagingBackup – 3.10.0<br><br>WP to Buffer: by WP Zinc – 3.9.6<br>Widget Disable: by required – 3.0.1<br>WPForms Lite: by WPForms – 1.9.3.1<br>Yoast SEO: WooCommerce: by Team Yoast – 16.4 Inactive Plugins (25)<br><br>AAA Option Optimizer: by Joost de Valk – 1.2.1<br>Advanced Database Cleaner PRO: by Younes JFR. – 3.2.8<br>BEAR – Bulk Editor and Products Manager Professional for WooCommerce: by realmag777 – 1.1.4.5<br>Google Customer Reviews for WooCommerce: by eCreations – 2.6.12<br>Newsletter: by Stefano Lissa & The Newsletter Team – 8.6.6<br>Newsletter - Addons Manager: by The Newsletter Team – 1.2.1<br>Newsletter - Automated Newsletters: by The Newsletter Team – 4.7.1<br>Newsletter - Contact Form 7: by The Newsletter Team – 4.3.7<br>Newsletter - Forms: by The Newsletter Team – 1.1.1<br>Newsletter - Leads Addon: by The Newsletter Team – 1.4.6<br>Newsletter - Reports and Retargeting: by The Newsletter Team – 4.5.7<br>Newsletter - WooCommerce: by The Newsletter Team – 1.9.4<br>Newsletter - WPForms Addon: by The Newsletter Team – 1.2.3<br>Newsletter - WP Users Addon: by The Newsletter Team – 1.3.7<br>Nextend Social Login: by Nextendweb – 3.1.16<br>PixelYourSite: by PixelYourSite – 10.0.4<br>PixelYourSite PRO: by PixelYourSite – 10.4.5.2<br>Popup Builder - Create highly converting, mobile friendly marketing popups.: by Looking Forward Software Incorporated. – 4.3.6<br>Popup Builder Advanced Closing: by Sygnoos – 2.2<br>Popup Builder Exit Intent: by Sygnoos – 4.2<br>Popup Builder WooCommerce: by Sygnoos – 3.2<br>PS Optimizer: by Allywebsite – 1.1<br>Revolut Gateway for WooCommerce: by Revolut – 4.18.5<br>WooPayments: by WooCommerce – 8.8.0<br>Yoast Test Helper: by Team Yoast – 1.18 Dropin Plugins ()<br><br>advanced-cache.php: advanced-cache.php<br>db.php: Query Monitor Database Class (Drop-in)<br>object-cache.php: Redis Object Cache Drop-In Must Use Plugins (1)<br><br>WP STAGING Optimizer: by WP STAGING – 1.5.6 Settings<br><br>Legacy API Enabled: ✔<br>Force SSL: –<br>Currency: GBP (£)<br>Currency Position: left<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)<br><br>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)<br><br>Connected to WooCommerce.com: ✔<br>Enforce Approved Product Download Directories: –<br>HPOS feature enabled: ✔<br>Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore<br>HPOS data sync enabled: ✔ Logging<br><br>Enabled: ✔<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 14 MB WC Pages<br><br>Shop base: #9 - /shop/<br>Basket: #10 - /cart/ - Contains the [woocommerce_cart] shortcode<br>Checkout: #11 - /checkout/ - Contains the [woocommerce_checkout] shortcode<br>My account: #12 - /my-account/<br>Terms and conditions: #97 - /terms-and-conditions/ Theme<br><br>Name: Flatsome Child<br>Version: 3.0<br>Author URL:<br>Child Theme: ✔<br>Parent Theme Name: Flatsome<br>Parent Theme Version: 3.19.9<br>Parent Theme Author URL: https://uxthemes.com<br>Theme type: Classic theme<br>WooCommerce Support: ✔ Templates<br><br>Overrides: flatsome/woocommerce/archive-product.php<br>flatsome/woocommerce/cart/cart-empty.php<br>flatsome/woocommerce/cart/cart-shipping.php<br>flatsome/woocommerce/cart/cart.php<br>flatsome/woocommerce/cart/mini-cart.php<br>flatsome/woocommerce/checkout/form-checkout.php<br>flatsome/woocommerce/checkout/form-coupon.php<br>flatsome/woocommerce/checkout/order-received.php<br>flatsome/woocommerce/checkout/terms.php<br>flatsome/woocommerce/checkout/thankyou.php<br>flatsome/woocommerce/content-product-cat.php<br>flatsome/woocommerce/content-product.php<br>flatsome/woocommerce/content-single-product.php<br>flatsome/woocommerce/content-widget-product.php<br>flatsome/woocommerce/global/breadcrumb.php<br>flatsome/woocommerce/global/quantity-input.php<br>flatsome/woocommerce/global/wrapper-end.php<br>flatsome/woocommerce/global/wrapper-start.php<br>flatsome/woocommerce/loop/header.php<br>flatsome/woocommerce/loop/loop-end.php<br>flatsome/woocommerce/loop/loop-start.php<br>flatsome/woocommerce/loop/pagination.php<br>flatsome/woocommerce/loop/rating.php<br>flatsome/woocommerce/loop/result-count.php<br>flatsome/woocommerce/loop/sale-flash.php<br>flatsome/woocommerce/myaccount/form-login.php<br>flatsome/woocommerce/myaccount/navigation.php<br>flatsome/woocommerce/notices/error.php<br>flatsome/woocommerce/notices/notice.php<br>flatsome/woocommerce/notices/success.php<br>flatsome/woocommerce/product-searchform.php<br>flatsome/woocommerce/single-product/photoswipe.php<br>flatsome/woocommerce/single-product/price.php<br>flatsome/woocommerce/single-product/product-image.php<br>flatsome/woocommerce/single-product/product-thumbnails.php<br>flatsome/woocommerce/single-product/rating.php<br>flatsome/woocommerce/single-product/related.php<br>flatsome/woocommerce/single-product/review.php<br>flatsome/woocommerce/single-product/sale-flash.php<br>flatsome/woocommerce/single-product/share.php<br>flatsome/woocommerce/single-product/short-description.php<br>flatsome/woocommerce/single-product/tabs/tabs.php<br>flatsome/woocommerce/single-product/title.php<br>flatsome/woocommerce/single-product/up-sells.php<br>flatsome/woocommerce/single-product-reviews.php<br>flatsome/woocommerce/single-product.php WooCommerce Google Product Feed feeds<br><br>3c3666242067a7b4: Google merchant centre product feed<br> Type: google<br> Category filter: -<br> Categories: -<br>d33c97c24fcb85c6: Moroccanoil<br> Type: google<br> Category filter: -<br> Categories: -<br>2b7d4be058181a6d: Google reviews feed<br> Type: googlereview<br> Category filter: -<br> Categories: -<br> Limit: - WooCommerce Google Product Feed options<br><br>Include variations in feed: Enabled<br>Send "item group ID": Enabled<br>Expanded schema markup: -<br>Debug key: 51bd19af-ab30-4ad4-9e30-92a571f3c439 WooCommerce Google Product Feed fields<br><br>Availability (backordered products): Defaults to "in stock".<br>Availability (in stock products): Defaults to "in stock".<br>Availability (out of stock products): Defaults to "out of stock".<br>Brand: Pre-populates from pwb-brand taxonomy.<br>Condition: Defaults to "new".<br>Global Trade Item Number (GTIN): Pre-populates from Any of GTIN fields from Yoast WooCommerce SEO.<br>Google Product Category:<br>Manufacturer Part Number (MPN): Pre-populates from product sku.<br>Product Type: Pre-populates from product_cat taxonomy.<br>Product description: Main product description (full preferred) plus variation description<br>Short title:<br>Title: Pre-populates from product product_title. WooCommerce Google Product Feed DB status<br><br>Database version: 17<br>Active database version: 17<br>wc_gpf_render_cache: Empty<br>woocommerce_gpf_google_taxonomy (en-GB): 5595 items WooCommerce PayPal Payments<br><br>Onboarded: ✔<br>Shop country code: GB<br>WooCommerce currency supported: ✔<br>Advanced Card Processing available in country: ✔<br>Pay Later messaging available in country: ✔<br>Webhook status: ✔<br>PayPal Vault enabled: –<br>ACDC Vault enabled: –<br>Logging enabled: –<br>Reference Transactions: –<br>Used PayPal Checkout plugin: ✔<br>Subscriptions Mode: Disabled<br>PayPal Shipping Callback: –<br>Apple Pay: ✔<br>Google Pay: ✔<br>Fastlane: – Admin<br><br>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>onboarding<br>onboarding-tasks<br>pattern-toolkit-full-composability<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>printful<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br>launch-your-store<br><br>Disabled Features: product-data-views<br>experimental-blocks<br>coming-soon-newsletter-template<br>minified-js<br>product-pre-publish-modal<br>settings<br>async-product-editor-category-field<br>product-editor-template-system<br>blueprint<br>reactify-classic-payments-settings<br>use-wp-horizon<br>add-to-cart-with-options-stepper-layout<br>blockified-add-to-cart<br><br>Daily Cron: ✔ Next scheduled: 2025-02-02 13:58:24 +00:00<br>Options: ✔<br>Notes: 70<br>Onboarding: completed Action Scheduler<br><br>Complete: 9,559<br>Oldest: 2025-01-01 15:46:29 +0000<br>Newest: 2025-02-01 15:24:49 +0000<br><br>Failed: 30<br>Oldest: 2024-10-05 14:46:30 +0100<br>Newest: 2025-01-29 20:34:08 +0000<br><br>Pending: 8<br>Oldest: 2025-02-01 15:53:27 +0000<br>Newest: 2025-02-04 23:57:11 +0000 Status report information<br><br>Generated at: 2025-02-01 15:24:52 +00:00<br>Hello bcgels,
Thank you for your reply.
I checked your site’s report and noticed there is one plugin that interacts with coupons.
– Free Gifts for WooCommerce: by FlintopCould you disable it and check if that resolves the error?
If that does not resolve the error, I suggest creating a staging site and performing a full Conflict Test.
You already have the WP Staging plugin installed, so you may use that.Looking forward to your response. 🙂
Hi.
I create a WP Staging and remove the Free gifts for Woocommerce. The error still there.
After that I changed the theme for the original from Woocommerce and these errors disappears.
So what to do now?
The errors comes from these lines
wc_doing_it_wrong()
wp-content/plugins/woocommerce/includes/wc-deprecated-functions.php:120WC_Legacy_Coupon->__get()
wp-content/plugins/woocommerce/includes/legacy/class-wc-legacy-coupon.php:61
Regards
Update:
I opened the functions.php on my flatsome child and remove the following bellow and that error disappear. Do you think I can have any problem in the live website removing this? I tested this on the staging website.
Regards
// Get all coupons
$coupons = get_posts(array(
'post_type' => 'shop_coupon',
'posts_per_page' => -1,
));
foreach ($coupons as $coupon) {
// Get the coupon data
$coupon_data = new WC_Coupon($coupon->post_title);
// Check if the coupon exists
if (!empty($coupon_data->id)) {
// Get the expiration date
$expiration_date = strtotime($coupon_data->get_date_expires());
// Get the usage count
$usage_count = $coupon_data->get_usage_count();
// Check if the coupon is expired and unused
if ($expiration_date && $expiration_date < time() && $usage_count === 0) { // Delete the coupon wp_delete_post($coupon_data->id);
// Optionally, log or display a message
error_log('Coupon ' . $coupon_data->get_code() . ' deleted because it is expired and unused.');
}
}
}Hello bcgels,
Thank you for your reply.
I am glad to know that you have found the root cause of the issue.
This code seems to interact with coupons and checking their details.It would be best to contact theme support and ask them if it is safe to remove this code.
They should be better equipped to guide you about their product.Please don’t hesitate to contact us again if you have more questions or concerns.
We are here to help 🙂Have a great day!
The topic ‘wc_doing_it_wrong()’ is closed to new replies.