You won’t be able to replace it at all if the plugin is not checking whether the constant has already been defined using if ( defined( 'MAX_THINGS' ) ). By definition constants can’t be overwritten, so this check is necessary to make a value ‘pluggable’. Adding @ to define() will suppress the error but it won’t make it work.
As you’ve noticed, plugins load before themes, so if the plugin does include this check you will need to set the constant in either a Must-use Plugin or the wp-config.php file, since both are safely editable and load before regular plugins. In my experience if a plugin supports customisation via constants then the expectation is usually that it would be added to wp-config.php.
Related Posts:
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- Is there any sort of theme dependency management?
- How do I cleanly override a plugin’s CSS with a child theme?
- Is it possible to stop selected plugins from loading on certain template pages?
- Add Plugins to WordPress Theme
- Function to activate WordPress theme inside a plugin
- Seeking clarification on page request life-cycle
- Which functions in theme or plugin load first
- Get info (url) from already enqueued styles
- How do I make my wordpress page more friendly for mobile viewers?
- WordPress Enqueue Script Chaos (jQuery & Foundation.js)
- Should I add sharing buttons using a plugin or directly in my theme files?
- Check javascript file Proper way in functions.php
- How to Build a Movie Library in WordPress 3.x
- resize only height using wp_get_image_editor
- How can I get full attachment url from wp_get_attachment_metadata?
- WP theme with Backbone
- Translating plugin inside the theme [closed]
- unzip a folder on specific location and delete the zip file
- Editing Theme to apply Co-Authors Plus
- How to limit WordPress pages during updates?
- Why is the Settings API is not saving my array of options
- Include Max mega menu Plugin into theme
- How to integrate plugin in WordPress theme
- How to include plugin without activation?
- How do you remove plugin edit option?
- Override the filter from plugin in child theme
- WordPress logo upload option in theme panel
- wordpress theme backend admin only
- how to load the language file in plugin?
- How to get current post user id
- Different UI in WordPress
- Redux Framework has an embedded demo. Click here to activate the sample config file
- Why does my functions.php cause white-screen and media-library issues?
- Display post lists in 2nd paragraph
- wp_get_post_terms is difference obj model than the one in rest api response
- Best place for short bio,image and button [closed]
- WordPress shows error related to allow_url_fopen
- How to show only next post pagination link using wp_link_pages()
- wp_footer hook only working on homepage not in other pages
- How can I position ShareThis buttons manually when using the plug-in? [closed]
- Plugin can not display in my custom theme
- Jquery NoConflict Problem
- How do I combine a theme with a plugin
- how to force tag page layout to use same as search layout?
- Great blogs site resources/tutorial for WordPress Developers? [closed]
- How to multiply a post to test internal search results?
- Use different single.php file based on condition
- How can I support plugins in a custom theme?
- Redeclare function after plugin activation
- Woocommerce singe product custom gallery output works just on the first slide
- Remove Pagination for Product Category Pages WooCommerce
- How can I use my custom wordpress theme on two websites? [closed]
- Widget for specific category
- How to customize this theme? [closed]
- WordPress API functions not working at AJAX functions.php call
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- Hardcode a form in Contact Form 7 [closed]
- Remember the Meta Value With Radio Buttons
- how to design change in woocommerce cart page and all other page also by theme? [closed]
- WordPress plugin with its own “site”/theme
- Get variable value based on string constant
- Override methods in Yoast SEO breadcrumb class
- Removing the custom_image_header from wp_head
- Xamp installed local wordpress not allowing to publish or install plugin
- Elementor Sidebar not loading when PRO elements plugin is active
- How would I get the new plugin version on this function?
- Newbie problem with adding include wp_footer
- Conditional Homepage for logged in user
- How can I see $post object in frontend from functions.php?
- How to get checkbox by default true in metabox?
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- when i activate my WordPress plugin cannot see customizer options or preview
- Is it possible to customize a wordpress post from outside dashboard(Something like site.com/post-type/post/?e=post_id)?
- When the user entered an unauthorized url redirect to login page
- Show content from plugin on index
- Help Code Review – I need to write on .htaccess file from theme’s function.php
- Where do the section input fields values are stored in database
- Get plugin to background of page
- How to display the Facebook like count in WordPress theme [closed]
- How to increase script execution time at my server
- twitter widget loads properly in all themes except my own theme?
- Directory structure for plugin changes
- How to show post attachment image
- Active Plugins for current blog in WP Multisite Network? [duplicate]
- Disqus plugin outputs script as literal text
- How to generate a responsive output from plugin?
- How to work email subscribe in WordPress?
- Apostrophes replaced by '
- Editing a theme
- Ajax button “Load more” is not loading correct language version posts for logged out users
- How to code a wordpress page properly? Dashboard or unique Theme files or alternative?
- how to make wordpress remember my choice
- Meta box not displaying on the plugin page
- Getting error when accessing Customizer Page
- Frontend Enqueued Files in the Backend
- How to create new title and its description inside a section in WP Customizer?
- I want to move the one click accesbility button on bottom of my website screen,
- Automatically install bundled plugins during theme activation?