title: need help removing action from plugin file
body: <p>Hello I am trying to remove an action from a wordpress plugin file.  The plugin is called Woocommerce Points and Rewards.  I have found the action I want to remove in one of the class files.  When I comment out the "add_action" it does exactly what I want.  But I am trying to remove the action from functions.php in my child them.  I have been reading on this and I think my problem is I need to "globalize" the class variable that the action is in; but I am not sure what that class variable is…</p>
  
  <p>here is the code where it adds the action (part of a file):</p>
  
  <pre><code>class WC_Points_Rewards_Cart_Checkout {
  
  
  /**
   * Add cart/checkout related hooks / filters
   *
   * @since 1.0
   */
  public function __construct() {
  
      // Coupon display
      add_filter( 'woocommerce_cart_totals_coupon_label', array( $this, 'coupon_label' )      );
      // Coupon loading
      add_action( 'woocommerce_cart_loaded_from_session', array( $this, 'points_last' ) );
      add_action( 'woocommerce_applied_coupon', array( $this, 'points_last' ) );
  
      // add earn points/redeem points message above cart / checkout
      add_action( 'woocommerce_before_cart', array( $this, 'render_earn_points_message' ), 15 );
  
      add_action( 'woocommerce_before_cart', array( $this, 'render_redeem_points_message' ), 16 );
  
      add_action( 'woocommerce_before_checkout_form', array( $this, 'render_earn_points_message' ), 5 );
      add_action( 'woocommerce_before_checkout_form', array( $this, 'render_redeem_points_message' ), 6 );
  
      // handle the apply discount submit on the cart page
      add_action( 'wp', array( $this, 'maybe_apply_discount' ) );
  
      // handle the apply discount AJAX submit on the checkout page
      add_action( 'wp_ajax_wc_points_rewards_apply_discount', array( $this, 'ajax_maybe_apply_discount' ) );
  }
  </code></pre>
  
  <p>The function I want to remove is this one:</p>
  
  <pre><code>add_action( 'woocommerce_before_cart', array( $this, 'render_redeem_points_message' ), 16 );
  </code></pre>
  
  <p>so far no luck in getting it removed; here is what I have in functions.php:</p>
  
  <pre><code>global $woocommerce, $wc_points_rewards;
  
  /*
  global $this;
  */
  
  remove_action( 'woocommerce_before_cart', array( $this, 'render_redeem_points_message' ), 16 );
  </code></pre>
  
  <p>so - I am sure this can be done in this way at least I have read that it can be done, I think I just have some thing wrong on this…</p>
  
  <p>I tried globalizing $this, but that just gave me an error message...</p>
  
  <p>if you need to see the entire file or something else please just let me know…</p>
  
  <p>So I am hoping someone on here can help me identify what I am doing wrong…</p>
  
  <p><strong>** UPDATE Monday 8/18 ********</strong>
  Looking for where class is instantiated; I have found this in the "woo commerce-points-and-rewards.php" file; this looks like this may be it but not sure what I am looking at; </p>
  
  <ol>
  <li><p>does this look like where the "WC_Points_Rewards_Cart_Checkout" is instantiated?</p></li>
  <li><p>And if so I am not sure how i use this to write my "remove action" in functions.php...</p>
  
  <p>private function includes() {</p>
  
  <pre><code>// product class
  require( 'classes/class-wc-points-rewards-product.php' );
  $this-&gt;product = new WC_Points_Rewards_Product();
  
  // cart / checkout class
  require( 'classes/class-wc-points-rewards-cart-checkout.php' );
  $this-&gt;cart = new WC_Points_Rewards_Cart_Checkout();
  
  // order class
  require( 'classes/class-wc-points-rewards-order.php' );
  $this-&gt;order = new WC_Points_Rewards_Order();
  
  // discount class
  require( 'classes/class-wc-points-rewards-discount.php' );
  $this-&gt;discount = new WC_Points_Rewards_Discount();
  
  // actions class
  require( 'classes/class-wc-points-rewards-actions.php' );
  $this-&gt;actions = new WC_Points_Rewards_Actions();
  
  // manager class
  require( 'classes/class-wc-points-rewards-manager.php' );
  
  // points log access class
  require( 'classes/class-wc-points-rewards-points-log.php' );
  
  if ( is_admin() )
      $this-&gt;admin_includes();
  }
  </code></pre></li>
  </ol>
  
  <p>Thanks so much...</p>