Hello Mike,
thanks for your answer!
I think i must change a little bit in the class-wc-stripe-webhook-handler.php
In this area!?
public function process_webhook_charge_succeeded( $notification ) {
// The following payment methods are synchronous so does not need to be handle via webhook.
if ( ( isset( $notification->data->object->source->type ) && 'card' === $notification->data->object->source->type ) || ( isset( $notification->data->object->source->type ) && 'three_d_secure' === $notification->data->object->source->type ) ) {
return;
}
$order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->id );
if ( ! $order ) {
WC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->id );
return;
}
$order_id = WC_Stripe_Helper::is_pre_30() ? $order->id : $order->get_id();
if ( 'on-hold' !== $order->get_status() ) {
return;
}
// Store other data such as fees
WC_Stripe_Helper::is_pre_30() ? update_post_meta( $order_id, '_transaction_id', $notification->data->object->id ) : $order->set_transaction_id( $notification->data->object->id );
if ( isset( $notification->data->object->balance_transaction ) ) {
$this->update_fees( $order, $notification->data->object->balance_transaction );
}
if ( is_callable( array( $order, 'save' ) ) ) {
$order->save();
}
/* translators: transaction id */
$order->update_status( $order->needs_processing() ? 'processing' : 'completed', sprintf( __( 'Stripe charge complete (Charge ID: %s)', 'woocommerce-gateway-stripe' ), $notification->data->object->id ) );
After Order the status change to pending payment, when the customer pay, its change to on hold and after Stripe become the money its change to processing.
But i will, its change immediately after pay to processing, whitout the step on hold.