• Resolved indreshyadav

    (@indreshyadav)


    We are making our plugin to compatible with your plugin so we need a filter in your plugin, so please provide the filter in following.

    /woo-stripe-paymnet/includes/abstract/abstract-wc-payment-gateway-stripe.php
    go to the function ‘should_save_payment_method’

    
    Please check the code.
    public function should_save_payment_method( $order ) {
    if ( ! $this->use_saved_source() && ! $this->is_processing_scheduled_payment() ) {
      if ( wcs_stripe_active() && $this->supports( 'subscriptions' ) ) {
        if ( wcs_order_contains_subscription( $order ) || wcs_order_contains_renewal( $order ) ) {
                return true;
         }
      }
      if ( ! empty( $_POST[ $this->save_source_key ] ) ) {
        return true;
      }
     }
    
      return apply_filters( 'wc_stripe_should_save_payment_method', false, $order, $this );//Add this filter..
    }
    • This topic was modified 4 years, 6 months ago by indreshyadav.
    • This topic was modified 4 years, 6 months ago by indreshyadav.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Need a filter for compatibility with pluign’ is closed to new replies.