title: How to remove an action in the constructor of a class in a plugin through functions.php in the theme?
body: <p>I'm trying to not to edit files directly in the plugin but i don't want the plugin's actions to execute.
  Here is the code:-</p>
  
  <pre><code>class YITH_WC_Points_Rewards_Earning {
         public static function get_instance() {
              if ( is_null( self::$instance ) ) {
                  self::$instance = new self();
              }
              return self::$instance;
          }
  
          /**
           * Constructor
           *
           * Initialize plugin and registers actions and filters to be used
           *
           * @since  1.0.0
           * @author Emanuela Castorina
           */
          public function __construct() {
              add_action( 'woocommerce_payment_complete', array( $this, 'add_order_points' ) );
              add_action( 'woocommerce_order_status_processing', array( $this, 'add_order_points' ) );
              add_action( 'woocommerce_order_status_completed', array( $this, 'add_order_points' ) );
  
          }
  }
  function YITH_WC_Points_Rewards_Earning() {
      return YITH_WC_Points_Rewards_Earning::get_instance();
  }
  </code></pre>
  
  <p>I don't want the actions in the plugin's class   to execute, so what I tried was this in my custom file which was in functions.php</p>
  
  <pre><code>remove_action( 'woocommerce_payment_complete', array( YITH_WC_Points_Rewards_Earning(), 'add_order_points' ) );
  remove_action( 'woocommerce_order_status_processing', array( YITH_WC_Points_Rewards_Earning(), 'add_order_points' ));
  remove_action( 'woocommerce_order_status_completed', array( YITH_WC_Points_Rewards_Earning(), 'add_order_points' ));
  </code></pre>
  
  <p>But still the plugin's actions get executed, i checked by wc_logger that YITH_WC_Points_Rewards_Earning() this is being sucessfully called in my custom file . So,how to make the plugin's actions not work?.Thanks </p>