This will work, but you'll need to remove the Hooks, only after they've been added. Sorry, I should have included this in the documentation too. Please follow these updated instructions.
Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
- Code: Select all
<?php
add_action ("ws_plugin__s2member_after_loaded", "remove_s2_pro_css");
function remove_s2_pro_css ()
{
remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_css_js::css");
}
?>
* This works for CSS only. You can't do this with s2Member's JS file, it would break Pro Form functionality and other areas of s2Member as well. The JavaScript library is required to operate s2Member.
If you'd like to ONLY remove the CSS for specific
Payment Gateway integrations, you can do it like this instead.
- Code: Select all
<?php
add_action ("ws_plugin__s2member_after_loaded", "remove_s2_pro_css");
function remove_s2_pro_css ()
{
remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_alipay_css_js::alipay_css");
remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_authnet_css_js::authnet_css");
remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_ccbill_css_js::ccbill_css");
remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_clickbank_css_js::clickbank_css");
remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_google_css_js::google_css");
remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_paypal_css_js::paypal_css");
}
?>
@TODO: update the official documentation to make this clear.100% Completed ( coming in the next release )