JJJ / ab-testing-for-wp

WordPress plugin which allow you to run A/B tests from anywhere within your content.
https://abtestingforwp.com
60 stars 6 forks source link

REST API endpoints are missing permission_callback in WordPress 5.5 #67

Closed maxharland closed 3 years ago

maxharland commented 4 years ago

Due to recent changes to the Wordpress Rest API the following warning is shown:

Notice: register_rest_route was called incorrectly. The REST API route definition for ab-testing-for-wp/v1/ab-test is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback.

Plugin version: 1.18.2 Wordpress version: 5.5.1

daviddarke commented 3 years ago

@maxharland and @Gaya I've started a PR for this: https://github.com/Gaya/ab-testing-for-wp/pull/68

Gaya commented 3 years ago

Thanks for contributing.

Haven’t had the chance to update to the latest WordPress version yet.

The e2e tests in the CI are failing because of this I am guessing.

Would be great if you could take a look.

daviddarke commented 3 years ago

Yeah sure! I'll take a look.

daviddarke commented 3 years ago

I've dropped back to your master and downgraded WP and still getting the same failures on the CI. @Gaya Can you just test master on your side to see if you are getting issues.

One for example from "ab-testing.spec.ts"/"Can change conditions of variants":

Screenshot 2020-10-30 at 15 47 33

Very similar to CI.

JJJ commented 3 years ago

Merged into the 1.19 release branch. 🙏