Title: Parse error: syntax error, unexpected &#8216;[&#8216;, expecting &#8216;)&#8217; &#8211; simple-payments.php
Last modified: August 29, 2018

---

# Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ – simple-payments.php

 *  Resolved [arindamg](https://wordpress.org/support/users/arindamg/)
 * (@arindamg)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/)
 * I just updated to the latest Jetpack 6.3 updated approx two hours back from now.
   And it broke my site with below error. I had to disable Jetpack manually via 
   file manager.
 * Is it something that recent update broke?
 * Anyone is also facing this?
 * `Parse error: syntax error, unexpected '[', expecting ')' in /xxx/wp-content/
   plugins/jetpack_disabled/modules/widgets/simple-payments.php on line 220`
 * I tried to reinstall but while activating I am getting same above error with “
   Plugin could not be activated because it triggered a fatal error.”

Viewing 15 replies - 1 through 15 (of 46 total)

1 [2](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/page/4/?output_format=md)
[→](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/page/2/?output_format=md)

 *  [Robey Lawrence](https://wordpress.org/support/users/robey/)
 * (@robey)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10460503)
 * I received a similar error, same file, though different line.
 * Fatal Error (E_ERROR): Call to undefined method Jetpack_Simple_Payments::is_enabled_jetpack_simple_payments()
   occurred in wp-content/plugins/jetpack/modules/widgets/simple-payments.php on
   line 480 please make sure that your website is accessible
 *  [whopgood](https://wordpress.org/support/users/whopgood/)
 * (@whopgood)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10460574)
 * I didn’t dig into any errors, but I can say Jetpack 6.3 took downevery WordPress
   site that I host. Deleted the plugins was the only way to get them back.
 *  [LeeFallin](https://wordpress.org/support/users/leefallin/)
 * (@leefallin)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10460587)
 * Same error – line 220 as with arindamg
 * I too tried to reinstall and it refuses to activate for the same reason. Frustraiting
   that it will check that before activation, but not as part as an automated update/
   upgrade.
 *  [Vinayy](https://wordpress.org/support/users/vinayy/)
 * (@vinayy)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10460609)
 * Replacing [ and ] with { and } worked for me. Of course, the plugin needs a proper
   update.
 * Open the file: plugins/jetpack/modules/widgets/simple-payments.php
 * Go to line 220
 * **CHANGE:**
 *     ```
       			wp_send_json_success( [
       				'product_post_id' => $product_post_id,
       				'product_post_title' => $params['post_title'],
       			] );
       ```
   
 * **TO:**
 *     ```
       			wp_send_json_success( {
       				'product_post_id' => $product_post_id,
       				'product_post_title' => $params['post_title'],
       			} );
       ```
   
 * _**Edit:**_ This merely removed the error but the plugin is not getting activated.
   The plugin needs an update.
    -  This reply was modified 7 years, 11 months ago by [Vinayy](https://wordpress.org/support/users/vinayy/).
      Reason: Plugin is not throwing the error but it is not getting activated
 *  [LeeFallin](https://wordpress.org/support/users/leefallin/)
 * (@leefallin)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10460626)
 * Thanks Vinayy. Though I am still getting the syntax error with that change. Interestingly–
   the change to {}, it produced a syntax error in my editor (as well as in WordPress)
   whereas the existing [] did not…
    -  This reply was modified 7 years, 11 months ago by [LeeFallin](https://wordpress.org/support/users/leefallin/).
      Reason: typo
 *  [kaito19](https://wordpress.org/support/users/kaito19/)
 * (@kaito19)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10460752)
 * Hello, I am facing the same error, please help! how to solve this problem?
    My
   site is downing because of this error….
 * `Parse error: syntax error, unexpected '[', expecting ')' in /xxx/wp-content/
   plugins/jetpack_disabled/modules/widgets/simple-payments.php on line 220`
 * I was trying to update to the latest version today and then this happened.
    Who
   can help me please??
 *  [Dat Hoang](https://wordpress.org/support/users/htdat/)
 * (@htdat)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10460763)
 * Hi, thank you all for your reports and we’re sorry for this issue.
 * > Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in jetpack/modules/
   > widgets/simple-payments.php on line 220
 * Our developers are aware of the issue here [https://github.com/Automattic/jetpack/issues/9858](https://github.com/Automattic/jetpack/issues/9858)
 * And we’re working on the solution [https://github.com/Automattic/jetpack/pull/9859](https://github.com/Automattic/jetpack/pull/9859)
 * **The temporary solution is to install the latest stable version of 6.2.1: **
 * 1. Log in to your site via FTP or File Manager
    2. Delete the existing Jetpack
   plugin folder in wp-content/plugins/jetpack. 3. Download the previous stable 
   version of Jetpack 6.2.1 – [https://downloads.wordpress.org/plugin/jetpack.6.2.1.zip](https://downloads.wordpress.org/plugin/jetpack.6.2.1.zip)
   4. Reinstall the plugin manually by following the instructions here: [http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation)
 * —–
 * > Fatal Error (E_ERROR): Call to undefined method Jetpack_Simple_Payments::is_enabled_jetpack_simple_payments()
   > occurred in wp-content/plugins/jetpack/modules/widgets/simple-payments.php 
   > on line 480 please make sure that your website is accessible
 * We’re still investigating this issue.
    -  This reply was modified 7 years, 11 months ago by [Dat Hoang](https://wordpress.org/support/users/htdat/).
 *  [yagihiro](https://wordpress.org/support/users/yagihiro/)
 * (@yagihiro)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10461066)
 * Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in /xxx/wp-content/plugins/
   jetpack_disabled/modules/widgets/simple-payments.php on line 220
 * こんにちは、私も更新をしたら同じエラーになりました。大変困っています！急ぎで改良
   版をお願いします。
 *  [trystan](https://wordpress.org/support/users/trystan-2/)
 * (@trystan-2)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10461147)
 * [@htdat](https://wordpress.org/support/users/htdat/) has the temporary solution.
 * If you don’t need the simple-payments option in Jetpack then another temporary
   fix for this is to go to the directory:
 * /wp-content/plugins/jetpack/modules/widgets/
 * Create a new directory in there called broken (or anything)
 * Move the file:
 * simple-payments.php
 * To the new directory “broken” that you’ve created.
 * All the best,
    Trystan
 *  [kalabistomas](https://wordpress.org/support/users/kalabistomas/)
 * (@kalabistomas)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10461288)
 * in my case replace is not working…
    the solution is in my post:
 * [http://tomaskalabis.com/wordpress/jetpack-for-wordpress-parse-error-syntax-error-unexpected-expecting-simple-payments-php/](http://tomaskalabis.com/wordpress/jetpack-for-wordpress-parse-error-syntax-error-unexpected-expecting-simple-payments-php/)
 *  [trystan](https://wordpress.org/support/users/trystan-2/)
 * (@trystan-2)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10461297)
 * So going on from [@htdat](https://wordpress.org/support/users/htdat/) temporary
   fix, this is how to do it at the command line:
 * cd ./wp-content/plugins
 * ls -alh
 * (This will list all the plugin directories, make a note of the ‘owner’ of the
   directories, on mine it says apache apache)
    (So on mine it looks like drwxr-
   xr-x 16 apache apache 4.0K Jun 8 19:24 jetpack )
 * (Double check that you have written this next command absolutely correctly as
   it deletes the jetpack directory and everything within it)
 * rm -Rf jetpack
 * wget [https://downloads.wordpress.org/plugin/jetpack.6.2.1.zip](https://downloads.wordpress.org/plugin/jetpack.6.2.1.zip)
 * unzip jetpack.6.2.1.zip
 * (This is the bit where you need to use the ‘owner’ that you found when you did
   the ls -alh command earlier. On mine it was apache. Change the apache to whatever
   the ownership was in your directory for the rest of the plugins.)
 * chown -R apache:apache jetpack
 * (So now, if you didn’t deactivate the broken jetpack then it will just work and
   is already activated. Happy days.)
 * Hopefully this will help if you have a lot of sites to fix.
 *  [Dat Hoang](https://wordpress.org/support/users/htdat/)
 * (@htdat)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10461405)
 * Hi,
 * Thanks everyone for your comments above.
 * We’ve released the point release 6.3.2 fixing this bug [https://jetpack.com/2018/07/04/jetpack-6-3-2-simple-payment-fix/](https://jetpack.com/2018/07/04/jetpack-6-3-2-simple-payment-fix/)
 * > This point fix addresses a fatal bug affecting all sites using PHP 5.3 and 
   > below.
 * A side note here: we recommend upgrading your sites to PHP 5.6 or later per this
   requirement – [https://wordpress.org/about/requirements/](https://wordpress.org/about/requirements/).
 * Most of the hosting providers are supporting PHP 5.6+ nowadays. If you’re not
   sure how to do this, feel free to reach your hosting provider(s).
 * Again, we’re sorry for this error.
 *  [trystan](https://wordpress.org/support/users/trystan-2/)
 * (@trystan-2)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10461415)
 * If you manage WordPress sites for others, and are concerned that the user updates
   to the broken Jetpack, then this is how to skip the broken version so that the
   update is now available to them:
 * Changed the version number in the file:
 * /wp-content/plugins/jetpack/jetpack.php to
 * Version 6.3.0
 * So now WordPress *thinks* that Jetpack is at version 6.3.0 (which is the latest,
   but broken Jetpack), so an update won’t become available until 6.3.1 onwards.
 *  [LeeFallin](https://wordpress.org/support/users/leefallin/)
 * (@leefallin)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10461701)
 * I ended up upgrading PHP to 7.2 which fixed this too. I should have done that
   much sooner really…
 *  [SwissMountainLeader](https://wordpress.org/support/users/swissmountainleader/)
 * (@swissmountainleader)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/#post-10462395)
 * I’m getting the same errors with 6.3.2 using PHP 7.2.7
 * removing the simple payments module & widget is the simplest and quickest fix.
 * 2018/07/04 15:32:01 [error] 923#923: *3201 FastCGI sent in stderr: “PHP message:
   PHP Fatal error: Uncaught Error: Class ‘Jetpack_Simple_Payments’ not found in/
   xxxxxxxxxxxxxxxx/wp-content/plugins/jetpack/modules/widgets/simple-payments.php:
   479

Viewing 15 replies - 1 through 15 (of 46 total)

1 [2](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/page/4/?output_format=md)
[→](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/page/2/?output_format=md)

The topic ‘Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ – simple-payments.
php’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 46 replies
 * 22 participants
 * Last reply from: [dougaitken](https://wordpress.org/support/users/dougaitken/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-expecting-simple-payments-php/page/4/#post-10628667)
 * Status: resolved