Parse error
-
Getting this error message:
Parse error: syntax error, unexpected ‘:’, expecting ‘{‘ in /home/mandierocket/public_html/wp-content/plugins/woocommerce/woocommerce.php on line 56
This is what line 56-58 currently looks like:
function wc_get_container() : \Psr\Container\ContainerInterface {
return $GLOBALS[‘wc_container’];
}Help! How do I fix?
The page I need help with: [log in to see the link]
-
Hi there,
Please share a copy of your site’s System Status. You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, you can paste it here in your reply.
Thank you!
### WordPress Environment ###
WordPress address (URL): https://rocketmarket.com
Site address (URL): https://rocketmarket.com
WC Version: 4.4.1
REST API Version: ? 1.0.15
WC Blocks Version: ? 3.1.0
Action Scheduler Version: ? 3.1.6
WC Admin Version: ? 1.4.0
Log Directory Writable: ?
WP Version: 5.5.1
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: –
WP Cron: ?
Language: en_US
External object cache: –### Server Environment ###
Server Info: Apache
PHP Version: 7.4.8
PHP Post Max Size: 32 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 7.62.0
OpenSSL/1.0.2kSUHOSIN Installed: –
MySQL Version: 5.6.48-cll-lve
Max Upload Size: 32 MB
Default Timezone is UTC: ?
fsockopen/cURL: ?
SoapClient: ?
DOMDocument: ?
GZip: ?
Multibyte String: ?
Remote Post: ?
Remote Get: ?### Database ###
WC Database Version: 4.3.3
WC Database Prefix: wp_
Total Database Size: 139.71MB
Database Data Size: 90.45MB
Database Index Size: 49.26MB
wp_woocommerce_sessions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_order_items: Data: 0.59MB + Index: 0.44MB + Engine MyISAM
wp_woocommerce_order_itemmeta: Data: 4.64MB + Index: 3.51MB + Engine MyISAM
wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_payment_tokens: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
wp_woocommerce_payment_tokenmeta: Data: 0.08MB + Index: 0.08MB + Engine MyISAM
wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_actionscheduler_actions: Data: 0.16MB + Index: 0.08MB + Engine MyISAM
wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_actionscheduler_logs: Data: 0.12MB + Index: 0.10MB + Engine MyISAM
wp_bwg_album: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bwg_album_gallery: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bwg_file_paths: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bwg_gallery: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bwg_image: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
wp_bwg_image_comment: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bwg_image_rate: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bwg_image_tag: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bwg_option: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bwg_shortcode: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_bwg_theme: Data: 0.03MB + Index: 0.00MB + Engine MyISAM
wp_cimy_uef_data: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_cimy_uef_fields: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_cimy_uef_wp_fields: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_cn_social_icon: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 6.52MB + Index: 9.09MB + Engine InnoDB
wp_eo_events: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_eo_venuemeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_options: Data: 10.45MB + Index: 0.50MB + Engine InnoDB
wp_postmeta: Data: 41.58MB + Index: 28.11MB + Engine InnoDB
wp_posts: Data: 22.55MB + Index: 3.83MB + Engine InnoDB
wp_prflxtrflds_fields_id: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_prflxtrflds_fields_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_prflxtrflds_field_values: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_prflxtrflds_roles_and_fields: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_prflxtrflds_roles_id: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_prflxtrflds_user_field_data: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_prflxtrflds_user_roles: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_rhc_cache: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
wp_rhc_events: Data: 0.06MB + Index: 0.09MB + Engine InnoDB
wp_rhc_rsvp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_say_what_strings: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_taxonomymeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_taxonomymeta_bak: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_termmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Data: 0.09MB + Index: 0.06MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_tm_taskmeta: Data: 0.16MB + Index: 0.02MB + Engine MyISAM
wp_tm_tasks: Data: 0.04MB + Index: 0.01MB + Engine MyISAM
wp_usermeta: Data: 1.52MB + Index: 1.88MB + Engine InnoDB
wp_users: Data: 0.06MB + Index: 0.05MB + Engine InnoDB
wp_wcs_payment_retries: Data: 0.25MB + Index: 0.04MB + Engine MyISAM
wp_wc_admin_notes: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.02MB + Engine MyISAM
wp_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_order_product_lookup: Data: 0.80MB + Index: 0.70MB + Engine MyISAM
wp_wc_order_stats: Data: 0.29MB + Index: 0.19MB + Engine MyISAM
wp_wc_order_tax_lookup: Data: 0.18MB + Index: 0.19MB + Engine MyISAM
wp_wc_product_meta_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM### Post Type Counts ###
attachment: 308
bwg_gallery: 5
daily_specials: 3
envira: 1
event: 13
events: 357
feedback: 8298
jetpack_migration: 2
ml-slider: 2
nav_menu_item: 44
optionsframework: 13
page: 36
payment_retry: 104
portfolio: 4
post: 60
product: 28
product_variation: 12
revision: 1544
shop_order: 4012
shop_order_refund: 37
shop_subscription: 241
tribe_events: 1### Security ###
Secure connection (HTTPS): ?
Hide errors from visitors: ?### Active Plugins (23) ###
Advanced Custom Fields: by Elliot Condon – 5.9.0
Calendarize it! for WordPress: by RightHere LLC – 4.9.8.97384
Jetpack by WordPress.com: by Automattic – 8.9
JRWDEV Daily Specials: by Jon Wadsworth – 1.5.2
MailChimp: by MailChimp – 1.5.7
Menu Social Icons: by Paul Clark – 1.3.10
Photo Gallery: by Photo Gallery Team – 1.5.61
Profile Extra Fields by BestWebSoft: by BestWebSoft – 1.1.9
Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.3
Sub Categories Widget: by BrokenCrust – 1.5.2
Toolbox for WooCommerce Subscriptions: by Shop Plugins – 1.4.21 – Installed version not tested with active version of WooCommerce 4.4.1
UpdraftPlus – Backup/Restore: by UpdraftPlus.Com
DavidAnderson – 1.16.28User Switching: by John Blackbourn & contributors – 1.5.5
Virtue/Ascend/Pinnacle Toolkit: by Kadence WP – 4.9.6
WooCommerce Customizer: by SkyVerge – 2.7.4 – Installed version not tested with active version of WooCommerce 4.4.1
WooCommerce Authorize.Net Gateway: by SkyVerge – 3.3.0
Booster for WooCommerce: by Pluggabl LLC – 5.2.1 – Installed version not tested with active version of WooCommerce 4.4.1
WooCommerce Mix and Match: by WooThemes – 1.2.5 (update to version 1.10.1 is available) – Installed version not tested with active version of WooCommerce 4.4.1
WooCommerce Product Archive Customiser: by jameskoster – 1.0.5 – Installed version not tested with active version of WooCommerce 4.4.1
WooCommerce Subscribe All the Things: by Prospress Inc. – 2.0.2-dev – Installed version not tested with active version of WooCommerce 4.4.1
WooCommerce Subscriptions CSV Importer and Exporter: by Prospress Inc – 2.0-beta – Installed version not tested with active version of WooCommerce 4.4.1
WooCommerce Subscriptions: by WooCommerce – 3.0.7
WooCommerce: by Automattic – 4.4.1### Inactive Plugins (1) ###
Autoptimize: by Frank Goossens (futtta) – 2.7.7
### Must Use Plugins (1) ###
installatron_hide_status_test.php: by –
### Settings ###
API Enabled: ?
Force SSL: ?
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: composite (composite)
external (external)
grouped (grouped)
mix-and-match (mix-and-match)
simple (simple)
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: ?
### WC Pages ###
Shop base: #1862 – /join/
Cart: #1863 – /club/
Checkout: #1864 – /checkout/
My account: #1865 – /my-account/
Terms and conditions: #2532 – /wine-club-the-fine-print/### Theme ###
Name: Virtue
Version: 3.1.2 (update to version 3.4.2 is available)
Author URL: https://kadencethemes.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: virtue/woocommerce/archive-product.php version 2.0.0 is out of date. The core version is 3.4.0
/home/mandierocket/public_html/wp-content/plugins/woocommerce-jetpack/includes/templates/cart-empty.php version 3.1.0 is out of date. The core version is 3.5.0
virtue/woocommerce/content-product.php version 3.0.0 is out of date. The core version is 3.6.0
virtue/woocommerce/content-product_cat.php
virtue/woocommerce/content-single-product.php version 3.0.0 is out of date. The core version is 3.6.0
virtue/woocommerce/emails/customer-new-account.php version 1.6.4 is out of date. The core version is 3.7.0
virtue/woocommerce/loop/loop-end.php
virtue/woocommerce/loop/loop-start.php version 2.0.0 is out of date. The core version is 3.3.0
virtue/woocommerce/loop/price.php
virtue/woocommerce/loop/rating.php version 3.0.0 is out of date. The core version is 3.6.0
virtue/woocommerce/loop/sale-flash.php
virtue/woocommerce/single-product/add-to-cart/external.php version 2.1.0 is out of date. The core version is 3.4.0
virtue/woocommerce/single-product/add-to-cart/grouped.php version 3.0.7 is out of date. The core version is 4.0.0
virtue/woocommerce/single-product/add-to-cart/simple.php version 3.0.0 is out of date. The core version is 3.4.0
virtue/woocommerce/single-product/add-to-cart/variable.php version 3.0.0 is out of date. The core version is 3.5.5
virtue/woocommerce/single-product/price.php
virtue/woocommerce/single-product/product-image.php version 3.1.0 is out of date. The core version is 3.5.1
virtue/woocommerce/single-product/product-thumbnails.php version 3.1.0 is out of date. The core version is 3.5.1
virtue/woocommerce/single-product/sale-flash.php
virtue/woocommerce/single-product.php
virtue/woocommerce/taxonomy-product_cat.php
virtue/woocommerce/taxonomy-product_tag.phpOutdated Templates: ?
Learn how to update
### Subscriptions ###
WCS_DEBUG: ? No
Subscriptions Mode: ? Live
Subscriptions Live URL: https://rocketmarket.com
Subscription Statuses: wc-active: 94
wc-on-hold: 53
wc-cancelled: 94WooCommerce Account Connected: ? Yes
Active Product Key: ? No
Custom Retry Rules: ? No
Custom Retry Rule Class: ? No
Custom Raw Retry Rule: ? No
Custom Retry Rule: ? No
Retries Migration Status: In-Progress
Report Cache Enabled: ? Yes
Cache Update Failures: ? 0 failure### Store Setup ###
Country / State: United States (US) — Washington
### Subscriptions by Payment Gateway ###
other: wc-cancelled: 1
Authorize.Net Credit Card: wc-active: 94
wc-cancelled: 93
wc-on-hold: 53### Payment Gateway Support ###
Cash on delivery: products
Authorize.Net Credit Card: products
card_types
payment_form
inline
lightbox
tokenization
token_editor
charge
charge-virtual
authorization
capture_charge
customer_decline_messages
refunds
voids
customer_id
add_payment_method
apple_pay
subscriptions
subscription_suspension
subscription_cancellation
subscription_reactivation
subscription_amount_changes
subscription_date_changes
multiple_subscriptions
subscription_payment_method_change_customer
subscription_payment_method_change_admin### Authorize.Net Credit Card ###
Environment: Production
Tokenization Enabled: ?
Debug Mode: Off
Webhooks Enabled: ?
No signature key configured### Action Scheduler ###
Complete: 273
Oldest: 2020-08-08 14:20:19 -0700
Newest: 2020-09-03 17:09:46 -0700Failed: 220
Oldest: 2018-04-03 01:48:04 -0700
Newest: 2020-08-02 15:59:38 -0700Pending: 103
Oldest: 2020-09-04 03:27:35 -0700
Newest: 2020-10-02 16:44:42 -0700`
Hi there,
Thank you very much for providing that.
Syntax errors like that are generally caused by conflicts with code in themes or other active plugins on the site.
I see your theme has a large number of outdated template overrides, and you have a number of plugins as well, some of which are on older versions.
To check for conflicts, please temporarily switch your theme back to Storefront and disable all plugins except for WooCommerce, then check to see if you still see that error message. If the error is gone, then please switch your theme back and reactivate plugins one-by-one until you find the one that is causing the error.
You can read about testing for conflicts in our documentation here:
https://docs.woocommerce.com/document/how-to-test-for-conflicts/Please let me know how that goes, or if you have any questions!
Hi @abbytws,
Hopefully, you were able to get this conflict sorted out. Since it’s been a while since we last heard back from you, I’m going to mark this thread resolved.
If you have any questions or trouble, please open up a new thread and we’ll be happy to help out.
Stay safe!
- The topic ‘Parse error’ is closed to new replies.