plugin compatibility
-
Hello Team,
we are making stripe plugin compatibility with others plugin
so we need some filters in following places to handle handle payment option.
In your plugin file /include/class-wc-stripe-upe-payment-gateway.php1. we need a filter withing ‘get_upe_enabled_at_checkout_payment_method_ids’ function
like return apply_filters(‘wc_stripe_upe_enable_payment_method’, $available_method_ids, $order_id );
For Example,public function get_upe_enabled_at_checkout_payment_method_ids( $order_id = null ) { $is_automatic_capture_enabled = $this->is_automatic_capture_enabled(); $available_method_ids = []; foreach ( $this->get_upe_enabled_payment_method_ids() as $payment_method_id ) { if ( ! isset( $this->payment_methods[ $payment_method_id ] ) ) { continue; } $method = $this->payment_methods[ $payment_method_id ]; if ( $method->is_enabled_at_checkout( $order_id ) === false ) { continue; } if ( ! $is_automatic_capture_enabled && $method->requires_automatic_capture() ) { continue; } $available_method_ids[] = $payment_method_id; } return apply_filters('wc_stripe_upe_enable_payment_method', $available_method_ids, $order_id ); }2. Also in
process_paymentfunction after line no 496.
$save_payment_method = apply_filters('wc_stripe_upe_force_save_source', $save_payment_method, $order );Please review this and provide the filter, if you have any alternate solution please provide.
The topic ‘plugin compatibility’ is closed to new replies.