I have a plugin which starts:
<?php
define( 'MAX_THINGS', 30 );
I would like to change the constant to be 2.
I know I can edit the plugin file directly - but that will be overwritten if the plugin is updated.
In my theme's functions.php
I have:
<?php
function my_theme_setup() {
@define( 'MAX_THINGS', 2 );
But that doesn't change things. I assume because the plugin is loaded before the theme?
Is there any way to set a constant before the plugin loads?
$something = MAX_THINGS;
) or indirectly (e.g.$something = apply_filter('awesome_max_things', MAX_THINGS);
)?