Building a fake embed shortcode and then calling run_shortcode to do this makes no real sense. Try this instead:
echo $wp_embed->shortcode(array(), $my_tour_video);
Edit: Additionally, when I use your code on a test page, using that embed, I get no such error as you’re describing. If you can come up with a reproducible test case, then it might be solvable.
If you are using the /embed/ URL, then that might cause it. Use the real URL of the video instead, as it shows when you’re looking at YouTube’s video page. The same URL you would normally paste into a post’s content.
Related Posts:
- Manipulating oembed_dataparse stopped working for YouTube embeds
- Video Embed with Captions in Turkish
- How to embed YouTube videos in posts without adding suggested videos at the end?
- Div around YouTube video
- WordPress Mediaelement – Youtube Videos Embed Options
- add_filter is failing to append &rel=0 to end of YouTube URL in oEmbed
- How do I embed youtube videos with https instead of http in the URL?
- WP Oembed not passing through the “autoplay=1” variable
- Modify youtube video size on one page and show another size on different page
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- How to change thumbnail of embedded Youtube video?
- How to add new embed handler not supported by oembed
- Youtube – Embed as IFRAME
- wp_embed_register_handler is not working
- Any way to use a custom Parameter for vimeo embed without using an iframe?
- Is it possible to modify the default YouTube embed attributes string?
- Removing WordPress Icon from oembed link footer
- Get all Youtube video’s from posts and embed them on a different page
- Hiding Comments Icon On oembed
- Youtube parameters within WordPress embed code?
- vimeo/youtube video embed with thumbnails
- Embed YouTube video from custom field value
- Can I use wp_oembed_get to detect a valid embeddable link or is there a better way to do so?
- extra text in Vimeo Embedded videos
- How can I force oEmbed to display fixed height & width dimensions?
- YouTube embed parameters?
- Embed Youtube video link in wordpress editor
- How to auto embedded youtube with wp_insert_post()
- How to apply an ID to Shortcode Embedded iframe
- How to change the way wp_embed handles only youtube videos?
- How to make my new theme read [youtube id=”id of the video here” width=”600″ height=”350″]?
- Embedding Youtube video on comments
- How to make enqueue_embed_scripts work with the embed_template filter
- YouTube embeded video will not resize (only full screen responsive) [closed]
- WordPress fails to embed video URL
- Add class and change src type inside wp_oembed_get
- How to disable URL preview in WordPress comments
- How to modify the HTML output of Gutenberg block? (Youtube)
- Remove wordpress embed share icon?
- Youtube iframe embed keeps disappearing from page
- Adding an official oEmbed provider to WordPress
- Completely disable oEmbed and auto-embed on frontend and post editor?
- Including plain text URL to post on same site is converting the URL to an embed
- Prevent using oEmbed for a specific domain
- How do I hide related videos at the end of a YouTube playlist embed code?
- Setting a post’s featured image from an embedded YouTube video
- Use [embed] filter in template files
- Do_Shortcode not working for Embed
- How can I change Max Embed Size in WordPress 3.5?
- Get first video from the post (both embed and video shortcodes)
- How can I clear oEmbed caches for YouTube on posts as they are loaded
- Soundcloud embed shortcode does not work
- How add class youtube and type/html to oembed code?
- How to Replace YouTube Videos with a “Click to Play” Thumbnail?
- YouTube oEmbed and privacy-enhanced mode
- add_filter to youtube embeds?
- wp_embed_register_handler not working
- Embed .mov file via ‘Add Media’ not working
- Detecting Embed URLs Within post_content
- Any way to use a custom Parameter for youtube embed without using an iframe?
- Customize Embedded Tweets (or, How To Hide Photos in Embedded Tweets)
- How to remove the embed_footer?
- How to change WordPress embedded player size or show just the play button
- how to embed external webpage in my wordpress page
- oEmbed youtube video aspect ratio
- use of tag into wordpress
- ted talks embed fixed, but can’t control size
- Add a YouTube or Vimeo video as a post attachment?
- Adding a wrapper to the youtube embed automatically?
- Convert all youtube link to embed
- How to embed a WordPress article on another website [closed]
- WordPress 5.3.x YouTube oEmbed is not working
- wp_embed_register_handler to embed html files
- How to add oEmbed support to my theme?
- How to create a static player top or bottom of wordpress?
- Embed YouTube video on category description
- Audio Playlists – Multiple file type support?
- Vimeo video embeds doesnt seem to work with ACF [closed]
- Use oEmbed in List Items
- Search XML file from within WordPress?
- WordPress keeps altering my embed code
- WordPress, oEmbed & YouTube video’s with a ‘dash’
- disable video URL auto-embedding for a part of the post
- Instagram URL is converted into oEmbed
- Check if page is embeded
- How can I override print_embed_sharing_dialog() in WordPress 4.5
- Embed Post in external page
- Responsive embed for the video shortcode
- How to set YouTube video as featured image?
- WordPress get embedded/attachment video
- pdf (25MB) – how to display and enable download?
- Outside url for post content
- want to stop stripping out from my post content
- How can I grab the video id of youtube?
- How to register a embed handler as a fallback to a oEmbed handler?
- Is there a way to create embed codes from wordpress/buddypress content?
- oEmbed not working in WordPress
- Display total questions of Moodle in WordPress [closed]
- How to display real-time data which is stored in an IBM Cloud web app
- MP4 video on wordpress working on desktop, not on mobile devices