I actually debugged this and found the problem. It is directly related to creating a post via the REST API.
I have found that when a post is created via the REST API that the hook callbacks happen in a different order from a post created with the admin UI. Specifically when the REST API calls wp_insert_post the data does not include any tags passed in via the JSON data. This means that if a plugin has a publish_post action set and needs to query the tags for the new post it will always fail. Setting a set_object_terms action and querying for the tags gives the right result. The problem is that the set_object_terms action happens AFTER the publish_post action. It is expected that when the publish_post is called that the tags are available for the new post.
Related Posts:
- Changing the “Plugin Activated” Message Default
- Is there a StackExchange-like voting plugin for WordPress? [closed]
- How Do I Use The WordPress Plugin Posts 2 Posts by Scribu?
- Notify Admins about Plugin Merge
- What is a Network Activated Plugin Exactly?
- While using WordPress Multisite is it possible to display data to main site from subsites?
- Get category ID in “archive-product.php”
- Make the css of the widget overwrite theme css
- How to set all external links to a certain domain to “nofollow”?
- How to Build a Movie Library in WordPress 3.x
- Intercept comment form submit/list by hook/filter
- How many security plugins are too many? [closed]
- Creating WordPress Plugin solely for Admin panel with dash menu and submenus
- I need to add a custom “cover” to every new post — plugin or custom setup?
- Creating an Exit Confirmation Popup
- How to prevent action in ajax request, when in admin side?
- Suspicious google tag manager
- How can I process xml file on upload?
- Permission Check for REST API Endpoint Runs Twice?
- Can I delete plugin files using FTP?
- Reposition Woocommerce Message
- After activating a Plugin, /wp-admin is no longer accessible
- Get all categories of custom post even not assigned
- Possible to add a language file to a plugin without adding .po/.mo files to plugin directory?
- Plugin not appearing after uploading it via FTP
- How to import my YouTube channel into WordPress?
- How get a value from a plugin into another plugin through action/filter
- Exclude post by custom meta with pre_get_posts
- CSV file generation failing
- Prevent duplicate records in plugin table
- Theme is Causing Ajax Conflicts for a plugin I cant identify it
- CSV syntax for WP All Import upload without ACF
- Error: Cannot find module ‘../build/Debug/nodegit.node’ [closed]
- Get Time Taken By Each Action Hook in WordPress
- Buddypress – Add the post_id in the bp_activity_add function
- Buidling a translate plugin for wordpress
- Automatic switch to backup database on fail
- Display wordpress post’s in popup?
- Magic Fields gives error File ___ doesn’t exist?
- Adding (image) caching to my Tumblr widget
- Help in using SEO Plugins: SEO Ultimate And Yoast SEO Plugin
- Setting Up PHP Workflow in WordPress
- do_action Nested List
- Can inactive WordPress plugins still load scripts?
- Plugin main file is constantly been fired on every website visit
- How to set “split_on_numerics” to false in ElasticSearch mapping using ElasticPress? (for proper SKU search in WooCommerce) [closed]
- Where should custom post types be registered in a plugin?
- plugin uninstall function drop the tables, but shows errors on admin
- How to use template inside plugin shortcode with variables for big HTML code
- Woocommerce – WordPress Roles & Capabilities
- Changing the Organize Series Listing Pages
- Way to send multiple values for column to MySQL?
- Changing location of “About me” section
- What’s the right way to implement functions in footer.php
- Getting a list of the published posts
- Showing the results of a search (made through a 3rd party search provider) inside an article
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- wp_mail – using a custom field value
- WP e-Commerce Gold Cart with Plugin Built Into Theme
- Regenerate Thumbnails Plugin successfully updated my thumbnails but image src won’t change to new image size?
- How to add a custom form to a plugin’s setting page
- How to get saved elementor template list programmatically?
- Edit all $wp_scripts at once to $in_footer = false
- Does WordPress do any internal caching if no plugin installed?
- “Disable” specific plugins on certain pages
- Upload Javascript and json webpage to wordpress
- woocommerce – adding wrapper around custom made woocommerce form fields
- custom post type get_posts() function not work
- Single Event page based on scope and use of PLACEHOLDER in PHP template file
- Create multiple posts when a custom post is created
- Different theme menu
- How can i redirect a register user to pay a specific amount before he or she have access to loggin to the dashboard?
- How to Upload images to a custom folder in upload folder using media uploader
- Remove metatag from a particular page
- deactivate WPBakery Page Builder license [closed]
- How to create WordPress nonce in the foreach loop?
- Updates Hidden on Dashboard
- user specific private content
- Plugin JavaScripts Confliction
- submit form data to wordpress existing database table using my plugin
- Plugin is not getting updated
- API page return Header 500 but Work
- apply_filters to content but ignore shortcodes
- display user input using ajax in wordpress
- Load wordpress enviroment for external content?
- Getting 404 page not found error while trying to access add new plugin / themes
- Plugin Install screeen not found
- WordPress plugin ajax post parameter
- Check if post was modified by editor different than post author
- Award points if a specific custom taxonomy is selected – Cubepoints
- How to disable register and reset the password from WordPress admin panel?
- formatting the way posts show up
- Suggest me plugin/widget (sidebar) for Sharing posts [closed]
- wordpress themes and plugin customization
- Install theme as part of a plugin
- Visual Composer Tabs don’t work on mobile
- How to load plugin static data from cloudfront
- WP-DBManager Plugin Can’t Find Mysql Path
- Change social icon in twenty twenty three theme
- Looking for Features in WP Compatible Slider