Support » 插件 » 移除某个插件的方法不起作用

  • <?php
    
    class Marketify_EDD_Template_Download {
    
        public function __construct() {
            add_action( 'wp_head', array( $this, 'featured_area' ) );
            add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
    
            add_action( 'marketify_entry_before', array( $this, 'download_title' ), 5 );
            add_action( 'marketify_entry_before', array( $this, 'featured_area_header_actions' ), 5 );
    
            add_action( 'marketify_download_info', array( $this, 'download_price' ), 5 );
    
            add_action( 'marketify_download_actions', array( $this, 'demo_link' ) );
    
            add_action( 'marketify_download_entry_title_before_audio', array( $this, 'featured_audio' ) );
    
            add_filter( 'post_class', array( $this, 'post_class' ), 10, 3 );
            add_filter( 'body_class', array( $this, 'body_class' ) );
        }
    }
    

    对于上面的插件类文件,//如何移除这个action中的download_price方法,使用

    remove_action( ‘marketify_download_info’, array( ‘Marketify_EDD_Template_Download ‘, ‘download_price’ ), 5 ); 发现无法移除该插件的marketify_download_info 这个action

查看 1 回复 - 1 至 1 (总计 1)
查看 1 回复 - 1 至 1 (总计 1)
  • You must be logged in to reply to this topic.