Just noticed … your latest plugin update, V5.2.1, is causing a console error.
The console error is: Uncaught SyntaxError: Unexpected token ‘,’
Details: https://prnt.sc/o8g_BL4NpLyi
The above occurs with your plugins, Analytify – Google Analytics Dashboard and Analytify Pro. When we deactivate either plugin, the console error disappears.
Kindly review and provide a fix. It appears your revised or updated code has an extra comma in it.
Thank you!
]]>So far I have tried to pinpoint the problem by:
– disabling my own theme and childtheme and activate the Storefront theme.
– disabling all plugins except for woocommerce, woocommerce payments and walletsystem for woocommerce.
– clearing all caches.
Payments don’t run into any conflict if they are placed as products in any other way. It only occurs when topping up in a variable amount.
Payments don’t run into any conflict if the order is handled by direct banktransfer.
Best regards,
Michel
I am getting an error when trying to add the “use” statement when working with namespaces. I have a file, snippet.php, that contains:
<?php
namespace Foo;
class Bar
{
public function __construct()
{
echo "This is Foo\Bar::__construct().<br/>\n";
}
}
Then in XYZ PHP Code, I create a snippet like this:
<?php
ini_set('display_errors', 1);
include_once "/home/[username]/public_html/snippet.php";
$bar = new Foo\Bar();
This works. However, when I attempt to add a “use” statement in the snippet code instead of the Foo prefix:
<?php
ini_set('display_errors', 1);
require_once("/home/[username]/public_html/snippet.php");
use Foo\Bar;
$bar = new Bar();
Then I get an “unexpected token” error:
Parse error: syntax error, unexpected token “use” in /home/[username]/public_html/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(99) : eval()’d code on line 4
There has been a critical error on this website.
Does anyone know what the issue here is? Is there some conflict with this plugin and “use” statements? Can you use “use” statements with this plugin?
I have WordPress 6.1.1, and PHP Code Snippet 1.3.3.
]]>WooCommerce version 4.4.1
Wordpress version 5.5
PHP 7.3.21
To reproduce, you can visit https://www.unclefuncles.com/product/free-item-test-product/ – add to cart then use the Cash on Delivery method to checkout without entering any payment. You should get the error after clicking Place Order.
I have just started receiving this error today. I have gone through old support threads from a few years ago and tried their suggestions of resetting permalinks, disabling plugins, etc. and am not making any progress.
Code Inspector in Chrome seems to be pointing at a SameSite issue. But, I’m not able to track down what it issuing that SameSite or if it’s even really what’s causing the problem.
Any help is appreciated. Thanks!
Jeff
It only occurs when a new user tries to check out after specifying her account username and password on the checkout page registration form. It doesn’t affect purchase flow when the user checking out is already logged in.
The symptom – newly registered users trying to check out get an error message:
Unexpected token < in JSON at position 0
Thanks for investigating this further.
]]>The screens which show an additional tab have an error in the console SyntaxError: unexpected token: identifier
.
I tried to find out any solution for this but no luck yet.
Please help me to figure this out asap.
]]>I can resolve this by hiding the overlay with css with this code:
.blockUI.blockOverlay{display: none !important;}
Although, I shouldn’t have to do that and I still can’t place an order. After hiding the overlay, I can click on the “Place Order” button, but then I receive this error:
“SyntaxError: Unexpected token < in JSON at position 0”
I Googled this error and the answers I found said to upgrade WooCommerce, but I’m already using v3.9.0.
Testing I’ve tried so far:
Deactivated every plugin except WC.
Changed theme from twenty-twenty to storefront.
Rolled WC back to v3.7.0
Deactivated PayPal and only allowed check payments
None of this has resolved either of these issues.
Here’s my current status report:
### WordPress Environment ###
WordPress address (URL): https://tobyleary.com/shop
Site address (URL): https://tobyleary.com
WC Version: 3.9.0
REST API Version: ✔ 1.0.6
Log Directory Writable: ✔
WP Version: 5.3.2
WP Multisite: –
WP Memory Limit: 768 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –
### Server Environment ###
Server Info: Apache
PHP Version: 7.1.33 - We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version
PHP Post Max Size: 128 MB
PHP Time Limit: 120
PHP Max Input Vars: 3000
cURL Version: 7.59.0
OpenSSL/1.0.2r
SUHOSIN Installed: –
MySQL Version: 5.6.40-84.0-log
Max Upload Size: 128 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
### Database ###
WC Database Version: 3.9.0
WC Database Prefix: tobyleary_
Total Database Size: 8.68MB
Database Data Size: 5.04MB
Database Index Size: 3.64MB
tobyleary_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
tobyleary_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
tobyleary_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
tobyleary_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
tobyleary_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_cjtoolbox_authors: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_cjtoolbox_backups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_cjtoolbox_blocks: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_cjtoolbox_block_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
tobyleary_cjtoolbox_block_pins: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
tobyleary_cjtoolbox_block_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
tobyleary_cjtoolbox_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
tobyleary_cjtoolbox_form_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_cjtoolbox_form_group_parameters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_cjtoolbox_form_group_xfields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
tobyleary_cjtoolbox_packages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
tobyleary_cjtoolbox_package_objects: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
tobyleary_cjtoolbox_parameters: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
tobyleary_cjtoolbox_parameter_typedef: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_cjtoolbox_parameter_typeparams: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_cjtoolbox_templates: Data: 0.05MB + Index: 0.11MB + Engine InnoDB
tobyleary_cjtoolbox_template_revisions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
tobyleary_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
tobyleary_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_loginizer_logs: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
tobyleary_options: Data: 2.02MB + Index: 0.08MB + Engine InnoDB
tobyleary_postmeta: Data: 1.52MB + Index: 2.02MB + Engine InnoDB
tobyleary_posts: Data: 0.45MB + Index: 0.27MB + Engine InnoDB
tobyleary_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
tobyleary_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
tobyleary_wc_product_meta_lookup: Data: 0.06MB + Index: 0.09MB + Engine InnoDB
tobyleary_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_yoast_seo_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
tobyleary_yoast_seo_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
### Post Type Counts ###
attachment: 156
custom_css: 2
customize_changeset: 17
nav_menu_item: 33
page: 6
post: 1
product: 21
product_variation: 567
revision: 27
scheduled-action: 14
### Security ###
Secure connection (HTTPS): ✔
Hide errors from visitors: ✔
### Active Plugins (1) ###
WooCommerce: by Automattic – 3.9.0
### Inactive Plugins (10) ###
Anti-Spam: by CreativeMotion – 6.5.3
Better Search Replace: by Delicious Brains – 1.3.3
Intuitive Custom Post Order: by hijiri – 3.1.2
Loginizer: by Raj Kothari – 1.4.3
Smush: by WPMU DEV – 3.4.2
TC Custom JavaScript: by Tiny Code – 1.1.1
UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
DavidAnderson – 1.16.21
WooCommerce PayPal Checkout Gateway: by WooCommerce – 1.6.18 – Not tested with the active version of WooCommerce
WP Rollback: by Impress.org – 1.7.0
Yoast SEO: by Team Yoast – 12.9.1
### Settings ###
API Enabled: –
Force SSL: –
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
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 WooCommerce.com: –
### WC Pages ###
Shop base: #41 - /shop/
Cart: #46 - /cart/
Checkout: #47 - /checkout/
My account: #48 - /my-account/
Terms and conditions: #942 - /terms-conditions/
### Theme ###
Name: twenty-twenty-child
Version: 1.0
Author URL:
Child Theme: ✔
Parent Theme Name: Twenty Twenty
Parent Theme Version: 1.1
Parent Theme Author URL: https://www.ads-software.com/
WooCommerce Support: ✔
### Templates ###
Overrides: –
### Action Scheduler ###
Complete: 14
Oldest: 2020-01-09 11:06:56 -0500
Newest: 2020-01-22 16:31:50 -0500
Pending: 0
Oldest: –
Newest: –
Canceled: 0
Oldest: –
Newest: –
In-progress: 0
Oldest: –
Newest: –
Failed: 0
Oldest: –
Newest: –
I would appreciate any suggestions and help!
]]>1 Error Unexpected token <
It seems this has shown up in the past too, back to 2018. These are the only errors I have, and debating whether I want to submit a theme to the repo or not, if the Theme Sniffer plugin is always showing this.
Is this one a bug?
]]>I have just updated the plugin, and I still have the PRO version 1.3.9 and the new template plugin pro 2.5.6. As soon as I enable the free version I get errors on my checkout page.
I have enabled debug mode and it says Unexpected token < in JSON at position 0 on the page itself and then inside the Chrome Dev Tools it says ‘ Unable to fix malformed JSON
‘
I have deleted the free version of the plugin and reinstalled it but made no difference.
What else can I try to resolve this?
Thank you in advance.
Regards,
Jhorene