Add filter for the transient's name in Eventbrite Manager.#37
Merged
kwight merged 1 commit intoSep 14, 2015
Merged
Conversation
kwight
added a commit
that referenced
this pull request
Sep 14, 2015
Add filter for the transient's name in Eventbrite Manager.
Contributor
|
Well done @wvega , thanks – it will be part of the next release. Thanks for the PR, and the writeup is great too; will certainly be pointing some people that way. |
Contributor
Author
|
Thank you @kwight for merging the PR so quickly 👍. I already updated the post to include a new workaround using the filter. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi everyone,
Thank you for this great plugin. It definitely saved me a lot of time last week!
Recently, I had to use Eventbrite API in a server that runs a 32-bit build of PHP. As you know, the events IDs from Eventbrite cannot be represented as a 32-bit integers, causing problems with most of the plugin's features.
I was able to get most of the features I need working, using filters and actions to insert the original ID in the necessary places. The details are here. My approach does not solve all the problems, but was almost enough for us.
Unfortunately, there is one more problem that I don't think I can solve using existing hooks. When the Event Manager creates the transient name to cache the results of a request to the
event_detailsendpoint, the value stored in thepindex of the parameters array is set to2147483647no matter which event is being queried.In my website, the requests ultimately returns the desired information, because I update the endpoint's URL to include the real ID, but Event Manager is not aware of that modification and as a result all my single event pages are showing information for the same event: the cached version of whichever event was requested first.
The commit in this PR adds a filter in the
get_transient_namemethod of Event Manager class, that will allow me to generate a transient name using the real event ID, preventing the problem I just explained.Is it possible to add that filter to the plugin?
I've been trying to solve the issues I found without touching the plugin's code, and that filter is, I think, the last piece of the puzzle. If you merge this PR, I can update my copy of Eventbrite API with the same modifications, knowing the next version will officially introduce the filter, thus making sure my solution will continue to be compatible.
Thank you!