All pages are considered woocommerce page
-
Hi,
I don’t know why but all my pages are considred woocommerce pages.
With the
is_woocommerce()
function, all pages return true.It’s a problem for two mains reasons :
1) woocommerce load js and css useful for the cart or checkout script on every pages and slow down my website.
2) rankMath automaticaly put “noindex” on meta tags on every woocommerce pages, so my entire website is “noindex”What I did already :
I used a troubleshooting plugin to deactivate all plugins and test my website with twenty-twenty-two theme. As soon as I activate woocommerce, all my pages becomes “woocommerce” pages.Could someone had the same issue and can help me figure it out?
Thx,
Alex
-
Hello,
…all my pages are considred woocommerce pages.
For a better explanation of the function
is_woocommerce()
please check our documentation below:
https://woocommerce.com/document/conditional-tags/#section-3As soon as I activate woocommerce, all my pages becomes “woocommerce” pages.
To check better into this, please share a copy of your site’s
System Status
, you can find it by navigating throughWooCommerce > Status
. Select “Get system report” and then “Copy for support”.?Thanks.
Hi,
Thanks for your reply.
Here is my system report :
### WordPress Environment ### WordPress address (URL): https://www.tibetanmedicine-edu.org Site address (URL): https://www.tibetanmedicine-edu.org WC Version: 6.7.0 REST API Version: ? 6.7.0 WC Blocks Version: ? 7.8.3 Action Scheduler Version: ? 3.4.0 Log Directory Writable: ? WP Version: 6.0.1 WP Multisite: – WP Memory Limit: 640 MB WP Debug Mode: – WP Cron: ? Language: en_GB External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 8.1.7 PHP Post Max Size: 300 MB PHP Time Limit: 300 PHP Max Input Vars: 3000 cURL Version: 7.74.0 OpenSSL/1.1.1k SUHOSIN Installed: – MySQL Version: 5.6.49-log Max Upload Size: 300 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 6.7.0 WC Database Prefix: wp_ Total Database Size: 124.31MB Database Data Size: 113.17MB Database Index Size: 11.14MB wp_woocommerce_sessions: Data: 0.28MB + 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.08MB + Index: 0.09MB + 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.44MB + Index: 0.56MB + 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.33MB + Index: 0.25MB + Engine InnoDB wp_awb_critical_css: Data: 3.52MB + Index: 0.02MB + Engine InnoDB wp_berocket_termmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_blogmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_blogs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ce4wp_abandoned_checkout: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.08MB + Index: 0.09MB + Engine InnoDB wp_duplicator_packages: Data: 0.03MB + Index: 0.02MB + Engine InnoDB wp_fbv: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_fbv_attachment_folder: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_fusion_forms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_fusion_form_entries: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_fusion_form_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_fusion_form_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_itsec_bans: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_itsec_dashboard_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_itsec_distributed_storage: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_itsec_fingerprints: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_itsec_geolocation_cache: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_itsec_lockouts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_itsec_logs: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_itsec_mutexes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_itsec_opaque_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_itsec_temp: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_itsec_user_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_mapping_to_external_entities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletters: Data: 0.03MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_newsletter_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_newsletter_option: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_segment: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_templates: Data: 3.09MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_scheduled_tasks: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_scheduled_task_subscribers: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_segments: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_sending_queues: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_settings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_statistics_bounces: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_statistics_clicks: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_statistics_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_statistics_opens: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_mailpoet_statistics_unsubscribes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_statistics_woocommerce_purchases: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_subscribers: Data: 0.02MB + Index: 0.13MB + Engine InnoDB wp_mailpoet_subscriber_custom_field: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_subscriber_segment: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_user_agents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_moodle_enrollment: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 6.03MB + Index: 0.45MB + Engine InnoDB wp_podsrel: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_postmeta: Data: 4.50MB + Index: 1.89MB + Engine InnoDB wp_posts: Data: 88.27MB + Index: 0.55MB + Engine InnoDB wp_rank_math_404_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_rank_math_analytics_gsc: Data: 4.03MB + Index: 4.14MB + Engine InnoDB wp_rank_math_analytics_inspections: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_rank_math_analytics_keyword_manager: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rank_math_analytics_objects: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_rank_math_internal_links: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_rank_math_internal_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rank_math_redirections: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_rank_math_redirections_cache: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_registration_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_signups: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_site: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_sitemeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.06MB + 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: 0.08MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wcpdf_packing_slip_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + 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_woobe_history: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_woobe_history_bulk: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### _pods_field: 6 _pods_group: 7 _pods_pod: 7 _pods_template: 1 acf-field: 48 acf-field-group: 4 attachment: 385 awb_off_canvas: 3 br_filters_group: 1 br_product_filter: 6 eb_course: 1 eb_order: 1 fusion_element: 10 fusion_form: 6 fusion_tb_layout: 18 fusion_tb_section: 25 homepage_news: 3 mailpoet_page: 1 nav_menu_item: 28 news: 3 page: 23 post: 80 product: 18 product_variation: 24 revision: 12 shop_order: 85 wp_global_styles: 2 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (23) ### Advanced Custom Fields PRO: by Delicious Brains – 5.12.3 iThemes Security: by iThemes – 8.1.2 CMP - Coming Soon & Maintenance Plugin: by NiteoThemes – 4.1.2 Copy & Delete Posts: by Copy Delete Posts – 1.3.0 Duplicator: by Snap Creek – 1.4.7 PayPal Express Checkout Payment Gateway for WooCommerce ( Free ): by WebToffee – 1.7.3 FileBird: by Ninja Team – 5.0.3 Flexible Checkout Fields: by WP Desk – 3.3.0 Avada Builder: by ThemeFusion – 3.8.1 Avada Core: by ThemeFusion – 5.8.1 Health Check & Troubleshooting: by The www.remarpro.com community – 1.4.5 Kadence WooCommerce Email Designer: by Kadence WP – 1.5.2 Stripe Payment Plugin for WooCommerce: by WebToffee – 3.7.2 Pods - Custom Content Types and Fields: by Pods Framework Team – 2.8.23 Rank Math SEO PRO: by Rank Math – 3.0.18.1 Rank Math SEO: by Rank Math – 1.0.95.1 Category Order and Taxonomy Terms Order: by Nsp-Code – 1.6.1 UberMenu 3 - The Ultimate WordPress Mega Menu: by Chris Mavricos SevenSpark – 3.7.8 W3 Total Cache: by BoldGrid – 2.2.4 BEAR – Bulk Editor and Products Manager Professional for WooCommerce: by realmag777 – 1.1.2 WooCommerce PDF Invoices & Packing Slips: by WP Overnight – 3.0.0 WooCommerce: by Automattic – 6.7.0 (update to version 6.8.2 is available) WP Mail SMTP: by WPForms – 3.5.1 ### Inactive Plugins (2) ### Max Mega Menu: by megamenu.com – 2.9.7 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5 ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Must Use Plugins (1) ### Health Check Troubleshooting Mode: by – 1.7.2 ### Settings ### API Enabled: – Force SSL: – Currency: CHF (CHF) Currency Position: left_space Thousand Separator: ' Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: simple (simple) grouped (grouped) variable (variable) external (external) Taxonomies: Product Visibility: rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) exclude-from-search (exclude-from-search) exclude-from-catalog (exclude-from-catalog) featured (featured) outofstock (outofstock) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: – ### WC Pages ### Shop base: #679 - /courses/ Basket: ? Page does not contain the [woocommerce_cart] shortcode or the woocommerce/cart block. Checkout: ? Page does not contain the [woocommerce_checkout] shortcode or the woocommerce/checkout block. My account: #9 - /my-account/ Terms and conditions: ? Page not set ### Theme ### Name: Avada Child Version: 1.0.0 Author URL: https://theme-fusion.com Child Theme: ? Parent Theme Name: Avada Parent Theme Version: 7.8.1 Parent Theme Author URL: https://themeforest.net/user/ThemeFusion WooCommerce Support: ? ### Templates ### Overrides: Avada-Child-Theme/woocommerce/cart/cart.php Avada/woocommerce/checkout/form-pay.php Avada-Child-Theme/woocommerce/checkout/review-order.php Avada-Child-Theme/woocommerce/checkout/thankyou.php Avada-Child-Theme/woocommerce/emails/email-addresses.php Avada/woocommerce/loop/loop-start.php Avada/woocommerce/single-product/add-to-cart/variable.php Avada/woocommerce/single-product/short-description.php Avada/woocommerce/single-product/tabs/additional-information.php Avada/woocommerce/single-product/tabs/description.php ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products experimental-product-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 wc-pay-promotion wc-pay-welcome-page wc-pay-subscriptions-page Disabled Features: minified-js settings Daily Cron: ? Next scheduled: 2022-08-24 16:38:35 +02:00 Options: ? Notes: 43 Onboarding: completed ### Action Scheduler ### Complete: 1,285 Oldest: 2022-07-24 09:09:58 +0200 Newest: 2022-08-24 08:31:29 +0200 Pending: 4 Oldest: 2022-08-24 13:27:53 +0200 Newest: 2022-09-01 02:00:34 +0200 ### Status report information ### Generated at: 2022-08-24 09:07:29 +02:00
Regards,
Alex
Hello,
Thanks for sending the system status report.WC Version: 6.7.0
It is recommended to update the WooCommerce version on your site:
https://woocommerce.com/document/how-to-update-woocommerce/May I ask if there is any custom on the site that is using the function
is_woocommerce()
? If so, can you please provide more details on how is this function being implemented on the site?Let us know, thanks.
Hello @ihereira,
Thanks for the tips. I updated woocommerce to 6.8.2 but nothing changed.
I tried with a completely blank page (no header, no footer, no title) with Avada and tried
is_woocommerce()
andis_checkout()
.is_woocommerce()
returnfalse
is_checkout()
returntrue
May I ask if there is any custom on the site that is using the function is_woocommerce()? If so, can you please provide more details on how is this function being implemented on the site?
No there’s no other custom code that use the
is_woocommerce()
function.Hey @amartignier,
As soon as I activate woocommerce, all my pages becomes “woocommerce” pages.
I’d like to know more about this. Can you tell us what method you follow or what code you’re using to find out that all your pages turn out to
is_woocommerce()
→true
?Thanks.
Hello @rainfallnixfig,
Thank you for your message.
So it starts when I checked the robot meta tag in the header of my pages. Each single pages had the meta set to
noindex
. I use RankMath pro for SEO so I checked with them why all my pages were set tonoindex
even with the right settings. They found out that each pages of my site were considered as woocommerce checkout page with the functionis_checkout()
.By default, rankMath put
noindex
tag to checkout page. But with a php snippet, they were able to reverse this default behavior. The snippet :add_filter( 'rank_math/frontend/robots', function( $robots ) { if( is_checkout() ) { $robots['index'] = 'index'; $robots['follow'] = 'follow'; } return $robots; });
Now all my pages are correctly indexed but they are still considered checkout page, so all js and css necessary for the checkout page (stripe, flexible-checkout-field, etc.) are injected to each page and slow them down.
So I’ve decided to write directly to the woocommerce support.
If you’d like to, I can send you login informations so you can have a look ?
Let me know.
Regards,
Alex
Hi Alex,
Thank you for getting back to us.
Each single pages had the meta set to noindex
This is not what I’ve seen on a default installation of WordPress, WooCommerce and the Storefront theme. Only the Cart, Checkout and My Account pages are set to
noindex
all other pages do not show noindex in the head meta.I’d suggest commenting out your custom code, disabling all plugins except WooCommerce and switching the theme to Storefront to see if you notice the same behavior.
If you’re not seeing the same after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated.
You can find a more detailed explanation on how to do a conflict test here: https://docs.woocommerce.com/document/how-to-test-for-conflicts/.
Let us know how it goes.
Hey @rainfallnixfig,
I did what you suggest.
I installed the storefront theme and activate it. I removed all my custom content or code, and deactivate all plugins.
Then I activated woocommerce alone, but the same behavior persist : I’ve tested each page with
is_checkout()
and each time it returnstrue
. Even I create a new blank page.Can I try install again the woocommerce plugin without loosing all my settings?
Hi there,
Can I try install again the woocommerce plugin without loosing all my settings?
Reinstalling WooCommerce keeps your current settings. To completely remove WooCommerce data you need to add a constant in your wp-config.php file:
https://woocommerce.com/document/installing-uninstalling-woocommerce/#uninstalling-woocommerce
Make sure you save backups at regular intervals before doing any changes to your site.
If you want to receive more insights on the issue you’re facing I’d suggest also posting in the following channels:
We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there as well.
Cheers.
Hey @rainfallnixfig ,
So I found a workaround for my issue. I’ve downloaded the Asset Cleanup plugins and deactivate all woocommerce related script to all my website (exept on cart and checkout page) and it worked well!
I didn’t want to uninstall Woocommerce and start over, but I still don’t know why it happened in the first place.
Thanks again for your answers and your help.
Regards,
Alex
- The topic ‘All pages are considered woocommerce page’ is closed to new replies.