Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
inpsyde-maticluznar committed Nov 22, 2023
1 parent 5bcf8f6 commit 141374e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/MerchantCapture/Capture/Type/StateChangeCapture.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public function __construct(ContainerInterface $container)
/** When the webhook process is activated we don't need automatic status change. Status change is handled
* by the webhook logic.
*/
add_action($pluginId . '_before_webhook_payment_action', function(){
remove_action('woocommerce_order_status_changed', [$this, "orderStatusChange"], 10, 3);
add_action($pluginId . '_before_webhook_payment_action', function () {
remove_action('woocommerce_order_status_changed', [$this, "orderStatusChange"]);
});
}

Expand Down
6 changes: 4 additions & 2 deletions src/MerchantCapture/MerchantCaptureModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,12 @@ static function (Payment $payment, WC_Order $order) use ($container) {
ManualCaptureStatus::STATUS_AUTHORIZED
);
$order->save();
} elseif ($payment->isPaid() && (
} elseif (
$payment->isPaid() && (
($container->get('merchant.manual_capture.is_waiting'))($order) ||
($container->get('merchant.manual_capture.is_authorized'))($order)
)) {
)
) {
$order->update_meta_data(
self::ORDER_PAYMENT_STATUS_META_KEY,
ManualCaptureStatus::STATUS_CAPTURED
Expand Down

0 comments on commit 141374e

Please sign in to comment.