Quim
Forum Replies Created
-
You will not see anything new, just go to Settings and click on Save Options. The snippet works when the settings are saved.
Inside your theme in functions.php file.
Once you have added the script go to the Restrict Content settings page and update the settingsHi,
It looks like updating settings from Restrict Content settings page removes the email templates (subject and body).
With this script the default templates will be added when saving the settings.
I strongly recommend you test it first in a development environment.
Maybe the plugin’s authors can validate this solution.add_filter('rcp_save_settings', function ($settings) { if (!function_exists('rcp_create_default_email_templates')) { return $settings; } if (!isset($settings['active_subject'])) { $templates = rcp_create_default_email_templates(); if ($templates) { $settings = array_merge($settings, $templates); } } return $settings; });
Forum: Plugins
In reply to: [Membership Plugin - Restrict Content] rcpStripeEnableForm is not definedThank you for your response.
I have an old version of the Pro plugin and in the register.min.js file the rcpStripeEnableForm function is defined with this name.
In my case I fixed it by removing .min from file’s url.
add_filter('script_loader_src', function ($src, $handle) { if ($handle === 'rcp-stripe-register') { $src = str_replace('.min', '', $src); } return $src; }, 10, 2);
I opened this topic so that the plugin authors can review it in the next updates.