From what I know you can use the post_updated or the save_post hooks
https://developer.wordpress.org/reference/hooks/post_updated/ https://developer.wordpress.org/reference/hooks/save_post/
Hope that this help. If you need any other info please let me know.
Update:
Sorry for my misunderstanding. You can use the the_permalink filter. Below you have the docs
https://codex.wordpress.org/Plugin_API/Filter_Reference/the_permalink
Related Posts:
- remove “index.php” from permalinks
- Rewrite Rule for Multilingual Website, Like qTranslate?
- How to filter to output of the get_permalink() function
- Regex in add_rewrite_tag not accepting OR operators?
- How to add a custom URL placeholder to author archives?
- WP JSON list all permalinks
- Permalink/Pagination issue: Category base name same as page name
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- Make post slug have priority over category slug
- Filtering comment permalinks when a condition is met
- Custom Rewrite with Query vars
- flexible rewrite ‘ramble’ URLs with WordPress
- add_rewrite_rule with 3 or fewer matches?
- Permalinks for WooCommerce Categories and Subcategories
- Change the custom post type permalink
- Redirect short-form URL to long-form URL (post_id to post_id + post_name)
- How to change URL structure for pagination pages?
- Rewriting permalinks with custom posts
- How to Modify Existing Rewrite Rules?
- rewrite_rule for custom post type doesn’t affect get_permalink
- Add ‘articles’ prefix before blog posts url without affecting pagination
- How to get wordpress link to fully evaluate when coming from facebook
- custom permalink/shortlink with base62 encoded post ID
- How to hook into permalink when publishing-saving post?
- Page Attachment Permalink Structure based on Menu Order?
- query_vars in plugin not working?
- WordPress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
- Call to a member function add_rule() on a non-object
- Why is add_rewrite_endpoint incompatible with /%category%/%postname%/ permalink structure?
- Re-write specific custom post type category URL to go to another page
- How to add_rewrite_rule with two parameters to a single view page?
- Rewrite Rule for default post type
- How to change the permalink option to post name on theme activation?
- Changing post content on save, using updated fields
- RewriteRule accepts numbers but not letters in tag
- Custom query var rewriting with only variable
- Date Archives’ Permalinks under Category folder
- Custom Permalink
- remove sub-category of Custom Post Type from permalink structure
- add_rewrite_rule not working for me
- Using WP Rewrite, but just not “getting it”
- Share same Slug for a Custom Post Type and 2 Taxonomies
- How to remove specific category from URL in WordPress
- Rewrite CPT permalinks and include WPML language
- Redirect Uploads Folder to Query Vars in WordPress
- Custom permalink leads to index page
- Need To Add Custom rewrite base url for individual user
- Rewrite URLs for LeadPages due to subdirectory installation
- Process all virtual sub pages on parent page
- Rewriting single post url; add_rewrite_rule problem?
- How to change “attachment_id” in attachment permarlink?
- Permalink slug no longer editable when using post_type_link filter
- WordPress Permalink feature alternative
- How to test custom rewrite rules /permalinks?
- wordpress how to replace url /bar with foo/bar for custom post type
- Remove some rewrite rules in wordpress
- Getting back a permalink from custom url
- Order custom post type posts by custom field with pretty URL
- Adding URL prefix for foreign language support
- add_rewrite_rule on default post type
- Exclude single page from permalink rule
- help to remove last trailing slash using add_rewrite_rule
- Rewrite rule not passing variable
- permalink and add_rewrite_rule – error 404
- Rewrite Post URL so it is constructed from parent post url & child post url
- corrupted URLs – can’t leave starting page
- Remove character from permalink
- Create different permalinks for same post
- Edit the output of a filter
- Multiple Taxonomy Items for Separate URLs
- Edit Post Permalink option removed, looking for possible causes
- Flush rewrite rules with scheduled event (cron)
- Multiple URL rewrite rules and get every prams
- Using a template file for a specific custom URL
- Add slug to default post permalinks ONLY
- Custom permalink question
- Added a prefix in URL permalink structure but the old structure still working!
- Permalinks Question: Adding a prefix ONLY in front of all posts with the ‘video’ post format
- Create new URL structure for custom post types
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- create user’s view profile link with username
- Pretty Filter URL
- WordPress Pagination Custom Rewrite Rule for Pages
- rewrites and custom links in page need help with add_rewrite_rule
- Add Custom Pagination Permalink
- Prevent guessing slug
- Custom Permalinks and filters?
- Pretty Permalink for Search Queries Not Working
- Permalink broken for pages after adding rewrite rule
- How to update permalink on the fly?
- standard post with extra parameter brings permalink problem
- Custom rewrites for pages and categories
- WordPress custom permalinks, pages are now 404
- Getting the terms from “Beautiful Taxonomy Filters” Results ot Integrate into “Ajax Load More”
- Add additional URL variations for a Post
- Standard Htaccess directives disappear by themselves
- ‘Unsupported Operand Types’ error stemming from taxonomy re-writes with PHP 8.1
- make a new structure tag that does some processing
- Rewrite permalink with PHP processing
- Is there a way to auto-link to products when writing a post?