Home › Forums › General Issues › Youtube Oembed field not working › Reply To: Youtube Oembed field not working
We have exactly the same problem and that’s because WordPress creates the player via the admin-ajax.php, resulting in that the request to the youtube oembed API comes from your server and not from your computer.
We host our WordPress Sites ourselves and we have 100+ sites running on our server. Some sites are heavily using ACF oEmbed.
Because WordPress handles the oembed request itself youtube gets a lot of requests from our server IP and we are hitting the quota limit.
This is the result of the curl:
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>302 Moved</TITLE></HEAD><BODY> <H1>302 Moved</H1> The document has moved <A HREF="https://www.google.com/sorry/index?continue=https://www.youtube.com/watch%3Fv%3DegSvdEJZRBk&q=EhAqAQSIAGYQALAcDF4AAAABGPyv5fQFIhkA8aeDS54ikJN6T6hIAXwP4RDLMyzfx9vjMgFy">here</A>. </BODY></HTML>
My take would be that ACF could enable an option to store the complete oembed response from google in the postmeta instead of only saving the entered url. With this, the frontend does not have to request the youtube oembed api everytime a uncached version of the site is loaded.
Is this realistic?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
ACF wouldn’t be so widely used in WordPress if it didn’t have some pretty amazing capabilities. In this article, we look at a few of the features we’ll discuss during “7 things you didn’t know you could do with ACF” at #WPEDecode later this month. https://t.co/5lnsTxp81j pic.twitter.com/Yf0ThPG1QG— Advanced Custom Fields (@wp_acf) March 16, 2023
© 2023 Advanced Custom Fields.