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

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

after udpdate jetpack plugin for wordpress i got error „Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ – simple-payments.php“

Parse error: syntax error, unexpected '[', expecting ')' in /data/web/virtuals/50209/virtual/www/wordpress/wp-content/plugins/jetpack/modules/widgets/simple-payments.php on line 220

Solution

replace  [ and ] with { and } on the line 220 not worked for me

                        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'],
			} );

I renamed the folder jetpack in wp-content/plugins/jetpack to jetpack_old and now it works !

Developers from jetpack still investigating this issue 

(Visited 239 times, 1 visits today)

1 komentář u „Jetpack for WordPress – Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ – simple-payments.php

Napsat komentář

Vaše e-mailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *