Custom order status not excluded from product level analytics
-
Hi, I have a custom order status, which I have checked to ignore on analytics > settings.
However, this setting is not respected when you go Analytics > products > show (change to a product) in this view, it does not exclude the custom order status
-
Hey there, @kieronboz! Thanks for contacting us. I’m happy to help you.
How did you add this custom order status? Did you use a plugin?
Can you please check if the same happens with a default order status or if it does correctly ignores it on the Analytics?
Furthermore, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:
System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
Fatal error logs (if any) under WooCommerce > Status > Logs. Then you can use the selector to search for Fatal Errors.
You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.Looking forward to your reply.
Have a wonderful day!
Hi there, so the custom order status is registered with the following code
function register_custom_order_status() { register_post_status('wc-funds-paid', array( 'label' => _x('Completed ??', 'Order status', 'blazecompetitions.co.uk'), 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Completed ?? (%s)', 'Completed ?? (%s)', 'blazecompetitions.co.uk') )); } add_action('init', 'register_custom_order_status'); function add_custom_order_status_to_wc($order_statuses) { $new_order_statuses = array(); // Add new order status at the appropriate place foreach ($order_statuses as $key => $status) { $new_order_statuses[$key] = $status; if ('wc-processing' === $key) { // Adjust if you want it after a different status $new_order_statuses['wc-funds-paid'] = _x('Completed ??', 'Order status', 'blazecompetitions.co.uk'); } } return $new_order_statuses; } add_filter('wc_order_statuses', 'add_custom_order_status_to_wc');
I am executing this via a snippet inside of the FluentSnippets plugin, at priority 20.
Here is status report
` ### WordPress Environment ### WordPress address (URL): https://blazecompetitions.co.uk Site address (URL): https://blazecompetitions.co.uk WC Version: 8.5.2 REST API Version: ? 8.5.2 WC Blocks Version: ? 11.8.0-dev Action Scheduler Version: ? 3.7.1 Log Directory Writable: ? WP Version: 6.4.3 WP Multisite: – WP Memory Limit: 4 GB WP Debug Mode: ? WP Cron: ? Language: en_GB External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.33 PHP Post Max Size: 100 MB PHP Time Limit: 30 PHP Max Input Vars: 4000 cURL Version: 7.61.1 OpenSSL/1.1.1k SUHOSIN Installed: – MySQL Version: 5.5.5-10.6.17-MariaDB Max Upload Size: 32 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 8.5.2 WC Database Prefix: wp_ Total Database Size: 505.78MB Database Data Size: 364.50MB Database Index Size: 141.28MB wp_woocommerce_sessions: Data: 3.02MB + Index: 0.06MB + 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: 2.52MB + Index: 0.50MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 41.55MB + Index: 48.08MB + 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: 12.02MB + Index: 15.05MB + 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: 8.03MB + Index: 6.72MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 12.52MB + Index: 9.09MB + Engine InnoDB wp_fls_auth_logs: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_fls_login_hashes: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_fsmpt_email_logs: Data: 171.09MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mb_relationships: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_options: Data: 14.47MB + Index: 2.17MB + Engine InnoDB wp_postmeta: Data: 10.19MB + Index: 3.81MB + Engine InnoDB wp_posts: Data: 3.50MB + Index: 1.33MB + Engine InnoDB wp_rm_custom_status: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_fields: Data: 0.13MB + Index: 0.00MB + Engine InnoDB wp_rm_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_front_users: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_login: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_login_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_paypal_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_paypal_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_reports_notifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_rows: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_sent_mails: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_sessions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_stats: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_submissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_submission_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_tabs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_tasks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rm_task_exe_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_signups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_spwap_analytics_data: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_spwap_data_analytics_overall: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_termmeta: Data: 0.09MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + 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_usermeta: Data: 14.45MB + Index: 12.75MB + Engine InnoDB wp_users: Data: 1.47MB + Index: 0.53MB + Engine InnoDB wp_user_registration_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 1.52MB + Index: 0.39MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_lottery_log: Data: 20.13MB + Index: 0.00MB + Engine InnoDB wp_wc_lottery_pn_instantwin: Data: 0.08MB + Index: 0.00MB + Engine InnoDB wp_wc_lottery_pn_log: Data: 20.16MB + Index: 0.00MB + Engine InnoDB wp_wc_lottery_pn_reserved: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_orders: Data: 3.52MB + Index: 3.39MB + Engine InnoDB wp_wc_orders_meta: Data: 12.50MB + Index: 29.02MB + Engine InnoDB wp_wc_order_addresses: Data: 1.52MB + Index: 1.27MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_wc_order_operational_data: Data: 1.52MB + Index: 0.73MB + Engine InnoDB wp_wc_order_product_lookup: Data: 2.52MB + Index: 3.75MB + Engine InnoDB wp_wc_order_stats: Data: 1.52MB + Index: 0.72MB + 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_woo_wallet_transactions: Data: 2.52MB + Index: 0.52MB + Engine InnoDB wp_woo_wallet_transaction_meta: Data: 0.30MB + Index: 0.27MB + Engine InnoDB wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpie_template: Data: 0.22MB + Index: 0.00MB + Engine InnoDB wp_wpjf3_mr_access_keys: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpjf3_mr_unrestricted_ips: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wt_iew_action_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### attachment: 491 charity: 18 ct_template: 12 custom_css: 1 custom_order_status: 1 draw-result: 12 emailoctopus_form: 1 faq: 5 instant-winner: 809 mb-post-type: 6 mb-settings-page: 1 meta-box: 3 nav_menu_item: 35 order_status: 1 page: 18 post: 9 product: 95 revision: 90 shop_coupon: 31 shop_order_placehold: 8377 user_registration: 1 winners: 265 wp_navigation: 1 wp_template: 2 wppb-roles-editor: 8 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (34) ### FluentSMTP: by FluentSMTP & WPManageNinja Team – 2.2.71 All-in-One WP Migration: by ServMask – 7.79 PublishPress Capabilities: by PublishPress – 2.12.2 Cashflows Payments by iDEAL Checkout: by iDEAL Checkout – 2.1.9.1 Cookie banner plugin for WordPress – Cookiebot CMP by Usercentrics: by Usercentrics A/S – 4.3.4 Fluent Snippets: by Fluent Snippets – 10.33 Email Verification for WooCommerce Pro: by WPFactory – 2.6.5 Products & Order Export for WooCommerce: by WPFactory – 2.0.10 Maintenance Redirect: by Peter Hardy-vanDoorn – 2.0 Klaviyo: by Klaviyo Inc. – 3.3.4 Loco Translate: by Tim Whitlock – 2.6.6 Login as User: by Web357 – 1.4.8 Meta Box AIO: by MetaBox.io – 1.24.2 Meta Box: by MetaBox.io – 5.9.3 AG OPP COPYandPAY Payment Gateway: by We are AG – 1.3.4 Oxygen Elements for WooCommerce: by Soflyy – 2.0 Oxygen: by Soflyy – 4.8.1 Push Notification: by Magazine3 – 1.32 Reports for WooCommerce Pro: by WPFactory – 1.7.0 Slim SEO: by eLightUp – 3.23.1 Super Payments: by Super Payments – 1.19.0 Super Progressive Web Apps PRO: by SuperPWA – 1.36 Super Progressive Web Apps: by SuperPWA – 2.2.23.1 SVG Support: by Benbodhi – 2.5.5 TeraWallet Partial Amount: by Standalonetech – 1.0.0 Trustpilot-reviews: by Trustpilot – 2.5.925 TeraWallet: by StandaloneTech – 1.4.10 WooCommerce Lottery Download Live Draw CSV: by wpgenie – 1.0 WooCommerce Lottery Pick Number: by wpgenie – 2.4.5 WooCommerce Lottery: by wpgenie – 2.2.2 WooCommerce PayPal Payments: by WooCommerce – 2.5.3 WooCommerce: by Automattic – 8.5.2 WP CLI Login Command Server: by Evan Mattson – 1.3 WP Super Cache: by Automattic – 1.11.0 ### Inactive Plugins (1) ### My Custom Functionality: by Your Name – 1.0.0 ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Settings ### API Enabled: – Force SSL: – Currency: GBP (£) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) lottery (lottery) simple (simple) variable (variable) 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 Woo.com: – Enforce Approved Product Download Directories: ? HPOS feature screen enabled: ? HPOS feature enabled: ? Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore HPOS data sync enabled: – ### WC Pages ### Shop base: ? Page ID is set but the page does not exist Basket: #11 - /cart/ Checkout: #12 - /checkout/ My account: ? Page does not contain the [woocommerce_my_account] shortcode. Terms and conditions: #324 - /terms/ ### Theme ### Name: Storefront Version: 4.5.4 Author URL: https://woo.com/ 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: – ### WooCommerce PayPal Payments ### Onboarded: ? Shop country code: GB WooCommerce currency supported: ? Advanced Card Processing available in country: ? Pay Later messaging available in country: ? Webhook status: ? PayPal Vault enabled: – ACDC Vault enabled: – Logging enabled: – Reference Transactions: ? Used PayPal Checkout plugin: – Subscriptions Mode: Disabled ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler 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 product-variation-management product-virtual-downloadable product-external-affiliate product-grouped 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: customize-store minified-js new-product-management-experience product-linked settings async-product-editor-category-field Daily Cron: ? Next scheduled: 2024-02-13 14:31:24 +00:00 Options: ? Notes: 59 Onboarding: skipped ### Action Scheduler ### Complete: 35,798 Oldest: 2024-01-12 18:33:01 +0000 Newest: 2024-02-12 18:17:49 +0000 Failed: 16 Oldest: 2023-12-07 14:33:58 +0000 Newest: 2024-02-09 10:10:09 +0000 Pending: 1 Oldest: 2024-02-13 12:46:47 +0000 Newest: 2024-02-13 12:46:47 +0000 ### Status report information ### Generated at: 2024-02-12 18:33:08 +00:00 `
I will check adding a default status to ignore.
Hi @kieronboz,
For reference, these particular forums are meant for general support with the core functionality of WooCommerce itself. For development and custom coding questions, it’s best to ask for insight related to those on either the WooCommerce Advanced Facebook group or the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:
- A local web developer
- Codeable.io
- WooExperts
Additionally, I’d recommend considering the WooCommerce Order Status Manager plugin. It allows for seamless integration with WooCommerce, and you can easily create, edit, and manage custom statuses without additional code snippets. This could simplify your setup and potentially resolve the issue you’re experiencing with analytics.
I wish I could help more, but hopefully, this gets you going in the right direction to get some further insight/information.
- The topic ‘Custom order status not excluded from product level analytics’ is closed to new replies.