Repository navigation
Simple Payments: PayPal script execution error on Gutenberg - #10531
Conversation
…ontend to prevent execution errors when loading Gutenberg on WP-Admin.
|
Caution: This PR has changes that must be merged to WordPress.com |
This is automated check which relies on Generated by 🚫 dangerJS |
| add_filter( 'rest_api_allowed_post_types', array( $this, 'allow_rest_api_types' ) ); | ||
| add_filter( 'jetpack_sync_post_meta_whitelist', array( $this, 'allow_sync_post_meta' ) ); | ||
| $this->register_scripts_and_styles(); | ||
| if ( ! is_admin() ) { |
There was a problem hiding this comment.
These scripts are not useful even if we're on wp-admin without Gutenberg? I.e. classic editor won't be missing them?
There was a problem hiding this comment.
The classic editor doesn't need them. These are just for the frontend to wire the actual pay button.
sirreal
left a comment
There was a problem hiding this comment.
I tested this following the steps here and those described in #10481. Everything seems to be working well.
- No errors in WP Admin Gutenberg editor.
- Calypso editor continues to work fine.
- Payment button is functional on the frontend of the site.
Thanks, 🚢 !
tyxla
left a comment
There was a problem hiding this comment.
I've also verified this fixes the issue, thanks 👍
…ontend to prevent execution errors when loading Gutenberg on WP-Admin. (#10531)
|
Cherry-picked to |
PayPal scripts are registered only for the site's Frontend to prevent execution errors when loading Gutenberg on WP-Admin.
Fixes #10481
Changes proposed in this Pull Request:
Testing instructions: