setup_theme is the earliest action you can call get_permalink() on. the rewrite class gets instantiated after plugins_loaded and before setup_theme in wp-settings.php, which is the object the error refers to. get_page_permastruct() is a method of the rewrite class.
Related Posts:
- How to call a plugin function from index.php
- Rewriting every url
- Passing URL parameters to WordPress pages and pretty url
- Publish Post After Click On A Link
- How to get the custom page get_permalink?
- Custom url structure for custom template
- Add a Custom Permalink option in the Permalink Admin Screen?
- How do I add a custom sub menu menu under Woo-commerce marketing?
- How to change custom post type pemalink Hierarcy
- Modifying Author Link to add Author Meta in URL
- Perform internal redirect in WordPress?
- How to get the permanent link in a plugin?
- flush_rewrite_rules() not working with update_option_{$option}
- Add_rewrite_endpoint doesn’t work with post name permalink structure
- How to embed a new string in url?
- Make get_permalink() work outside the Loop using filters
- help intercepting save_post through plugin
- WordPress Frontend Page using Plugin
- Child theme modifications not showing up
- Create new page in wordpress plugin which doesn’t exist
- Getting Fatal error: Uncaught Error: Call to undefined function plugin_dir_path() when linking to another file within my wordpress plugin
- Changing author slug for a custom role without using plugin
- Custom author page for custom role
- Custom role not listed
- Is it possible to change plugin’s Admin Panel Url?
- Coming soon pages with rest of site in maintenance mode
- claim a permalink and all sublinks in plugin
- use WordPress theme / plugin editor in my plugin
- What is the best way to output plugin result in certain url
- Plugin Development: WordPress processes twice on post update. How to skip process on the first?
- WordPress widget / plugin….fields not appearing in my widget
- This doesnt work for Plugin get_template_directory_uri()
- What is $tab in `install_plugins_{$tab}` hook?
- Fatal error: Class not found in
- Language Translation is not working?
- What user roles should have wp_unique_post_slug_is_bad_flat_slug filter applied?
- Let user subscribe to specific categories
- add action for displaying posts using a shortcode
- Best way to hook a custom url?
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- Changed permalink structure. Need help with redirecting old posts
- Change permalink structure hidden button edit
- How to load plugin after page is loaded – pagespeed issues
- Do action only on certain front end pages?
- Archive – same title for the first two posts
- Create a navbar filter that filters by a custom field
- add tabs in rdp-plugin/includes/settings.php and get settings saved
- Proper way to replace the_content only for pages created by custom plugin
- Certain functions are undefined when called form mu-plugins
- Can plugin2 uninstall plugin1 at the very beginning of plugin2’s installation?
- I changed font of wordpress dashboard but it is slow!
- Get Every Key & Value from Array then Display All in New Line
- Creating a functionality plugin to edit seriously simple podcasting
- Plugin temporary files and files to download via FTP
- Make plugin php file called directly aware of WordPress?
- How to add credit card validation check to wordpress [closed]
- Next Previous Post in wordpress with previous / next link with title?
- How to use existing hook in twentytwelve to all theme of wordpress?
- Remove List Bullets
- How to set plugin auto-update Enabled by default?
- How to translate to spanish wordpress hardcoded content/files?
- what functions to use to resize images and create DB metadata for them after/during upload?
- How to Create a Learning Management Plugin in WordPress to Manage Courses [LMS]
- Store admin page into variable
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- WP Plugin CSS not being applied to page
- Overwriting Plugin’s Ajax callback function from theme
- How can I get the Post ID and Post Type within a Must Use Plugin?
- Unable to sync woocommerce variations
- Can’t find variable is_single in my jQuery plugin
- WordPress Cron function is not working
- Plugin hook breaks new WP 4.0 media library grid view?
- homepage olderposts link showing page not found
- Get page type to display content
- Is an Office a custom post type [closed]
- How to add image for custom taxonomy
- wordpress Ajax success doesn’t return the value
- How to open author url linked to a new tab in settings page in the WordPress plugin list
- How to remove site name (https://exp.com/) from WORDPRESS site source links or file load url
- Custom wordpress plugin does not save select element
- How to set meta-data for my plugin
- WordPress isn’t sending welcome email with the password reset
- A splash page on landing page
- Inline AJAX script passing variables to PHP
- I’m getting the following error: Fatal error: Uncaught Error: Call to undefined function oil_paint_regeneration() [closed]
- how to code activate/deactive button of custom plugin within backend?
- move setting data from wordpress api to codestar freamwork
- How to access the page without registering in wordpress
- CPT template is not being automatically used single post pages
- How to trigger plugin migration code when plugin updates?
- How to Save Category and Delete Category in same Function
- Vanilla javascript in custom gutenberg block not working
- How to use `$order->get_discount_total()`, avoiding defoult WC decimal rounding?
- add_action() not working for admin
- WordPress Plugin translation not working EN To FR
- Error 400 Invalid “products[1].productId” Kinguin [closed]
- How to create new title and its description inside a section in WP Customizer?
- View Version Details” on Plugin update shows “Plugin not found
- Custom page template from plugin does not work with pre-installed themes in WordPress 6.6.1
- Custom Elementor controls not appearing in the widget Advanced tab using injection hooks