在woocommerce membership插件中有一個名爲class-wc-memberships-restrictions.php的文件,該文件具有以下類和構造函數,並且該構造函數具有大量過濾器,但是我想從此過濾器中刪除此過濾器我的孩子主題functions.php文件woo商業會員插件
如何從子主題的functions.php文件中刪除此過濾器
class WC_Memberships_Restrictions {
public function __construct() {
add_filter('the_content', array($this, 'restrict_content'));
}
檢查['remove_filter()'](https://codex.wordpress.org/Function_Reference/remove_filter),但您需要知道如何初始化WC_Memberships_Restrictions。 – helgatheviking
如何初始化在functions.php文件中的插件類 –