cocart-headless / cocart-core

This is the core of CoCart that provides support for managing the user session and decouples WooCommerce.
Other
3 stars 1 forks source link

Deprecated logs only when deprecated actions or filters are triggered #3

Closed sgehrman closed 1 year ago

sgehrman commented 1 year ago

Prerequisites

Describe the bug

2023-07-11T06:52:29+00:00 DEBUG ====CoCart Lite Version: 3.8.1==== ====Start Log July 11, 2023 @ 6:52 am==== cocart_return_empty_cart is deprecated since version 3.0.0! Use cocart_empty_cart instead. But only if you are using API v2. ====End Log====

2023-07-11T06:52:29+00:00 DEBUG ====CoCart Lite Version: 3.8.1==== ====Start Log July 11, 2023 @ 6:52 am==== cocart_ok_to_add_response is deprecated since version 3.0.0 with no alternative available. This filter is no longer used in the API. ====End Log====

2023-07-11T06:52:29+00:00 DEBUG ====CoCart Lite Version: 3.8.1==== ====Start Log July 11, 2023 @ 6:52 am==== cocart_ok_to_add is deprecated since version 3.0.0 with no alternative available. This filter is no longer used in the API. ====End Log====

2023-07-11T06:53:27+00:00 DEBUG ====CoCart Lite Version: 3.8.1==== ====Start Log July 11, 2023 @ 6:53 am==== cocart_return_empty_cart is deprecated since version 3.0.0! Use cocart_empty_cart instead. But only if you are using API v2. ====End Log====

2023-07-11T06:53:27+00:00 DEBUG ====CoCart Lite Version: 3.8.1==== ====Start Log July 11, 2023 @ 6:53 am==== cocart_ok_to_add_response is deprecated since version 3.0.0 with no alternative available. This filter is no longer used in the API. ====End Log====

2023-07-11T06:53:27+00:00 DEBUG ====CoCart Lite Version: 3.8.1==== ====Start Log July 11, 2023 @ 6:53 am==== cocart_ok_to_add is deprecated since version 3.0.0 with no alternative available. This filter is no longer used in the API. ====End Log====

2023-07-11T06:57:17+00:00 DEBUG ====CoCart Lite Version: 3.8.1==== ====Start Log July 11, 2023 @ 6:57 am==== cocart_return_empty_cart is deprecated since version 3.0.0! Use cocart_empty_cart instead. But only if you are using API v2. ====End Log====

Expected behavior

no logs

Actual behavior

log messages

Steps to reproduce

runit

WordPress Environment

`

WordPress Environment

WordPress address (URL): https://store.deckr.surf Site address (URL): https://store.deckr.surf WC Version: 7.8.2 REST API Version: ✔ 7.8.2 WC Blocks Version: ✔ 10.2.4 Action Scheduler Version: ✔ 3.5.4 Log Directory Writable: ✔ WP Version: 6.2.2 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: –

Server Environment

Server Info: nginx/1.25.1 PHP Version: 8.0.29 PHP Post Max Size: 64 MB PHP Time Limit: 600 PHP Max Input Vars: 1000 cURL Version: 7.74.0 OpenSSL/1.1.1n

SUHOSIN Installed: – MySQL Version: 8.0.33 Max Upload Size: 64 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 7.8.2 WC Database Prefix: wp_ Total Database Size: 8.69MB Database Data Size: 6.91MB Database Index Size: 1.78MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.05MB + Index: 0.11MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_cocart_carts: Data: 0.19MB + Index: 0.02MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_e_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_fsmpt_email_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_lic_key_tbl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_lic_reg_domain_tbl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_lmfwc_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_lmfwc_generators: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_lmfwc_licenses: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_lmfwc_licenses_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 4.02MB + Index: 0.08MB + Engine InnoDB wp_postmeta: Data: 0.09MB + Index: 0.11MB + Engine InnoDB wp_posts: Data: 1.41MB + Index: 0.06MB + Engine InnoDB wp_serial_numbers: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_serial_numbers_activations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wp_wc_admin_notes: Data: 0.08MB + Index: 0.00MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wp_phpmyadmin_extension__errors_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB

Post Type Counts

attachment: 8 custom_css: 2 customize_changeset: 3 elementor_library: 1 nav_menu_item: 11 page: 6 post: 4 ppdgorder: 5 ppec-products: 2 product: 1 revision: 165 shop_coupon: 1 shop_order: 9 wp_global_styles: 6 wp_navigation: 1 wp_template: 1 wp_template_part: 1 wpec_coupons: 1

Security

Secure connection (HTTPS): ✔ Hide errors from visitors: ✔

Active Plugins (3)

FluentSMTP: by FluentSMTP & WPManageNinja Team – 2.2.5 Deckr Store: by Steve Gehrman – v1.1 WooCommerce: by Automattic – 7.8.2

Inactive Plugins (7)

CoCart - CORS Support: by Sébastien Dumont – 1.0.2 CoCart - Decoupling WooCommerce Made Easy: by Sébastien Dumont – 3.8.2 Debug Log - Config Tool: by Lukman Nakib – 1.4.2 Software License Manager: by Tips and Tricks HQ – 4.5.5 WooCommerce Email Validation: by Hugh Lashbrooke – 2.1.1 WooCommerce PayPal Payments: by WooCommerce – 2.1.0 WooCommerce Stripe Gateway: by WooCommerce – 7.4.1

Settings

API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: donation (donation) external (external) grouped (grouped) simple (simple) slm_license (slm_license) subscription (subscription) variable (variable) variable subscription (variable-subscription)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)

Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ✔ HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: –

WC Pages

Shop base: #637 - /shop/ Cart: #638 - /cart/ Checkout: ❌ Page ID is set but the page does not exist

My account: #132 - /my-account/ Terms and conditions: ❌ Page not set

Theme

Name: Twenty Twenty-Three Version: 1.1 Author URL: https://wordpress.org Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔

Templates

Overrides: –

Admin

Enabled Features: activity-panels analytics product-block-editor coupons customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page

Disabled Features: core-profiler minified-js new-product-management-experience product-variation-management settings async-product-editor-category-field

Daily Cron: ✔ Next scheduled: 2023-07-16 09:03:56 +00:00 Options: ✔ Notes: 103 Onboarding: completed

Action Scheduler

Complete: 51 Oldest: 2023-06-15 10:52:22 +0000 Newest: 2023-07-16 04:12:13 +0000

Failed: 5 Oldest: 2023-05-10 11:22:58 +0000 Newest: 2023-07-09 06:30:15 +0000

Pending: 1 Oldest: 2023-07-16 16:24:28 +0000 Newest: 2023-07-16 16:24:28 +0000

Status report information

Generated at: 2023-07-16 04:27:56 +00:00 `

Isolating the problem

seb86 commented 1 year ago

@sgehrman I'm not sure what your trying to explain here. These are warning messages for developers. Nothing mentioned here is causing a bug. Please explain.

sgehrman commented 1 year ago

I'm not calling these deprecated functions? Who is? Why have these? If I see logs, I assume it's buggy.

seb86 commented 1 year ago

Thank you for the feedback. I have improved the deprecation so the logs are only recorded if the action hooks or filters are actually triggered. [PR-1] [PR-2]