Skip to content

Commit

Permalink
Fix webhook validation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyn committed Jun 10, 2024
1 parent efa6b4a commit a1a5e73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/woocommerce-gateway-monei-core-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ function monei_get_option_key_from_order( $order ) {
return $option_key;
}

$order = is_numeric( $order ) ? new WC_Order( $order ) : $order;
if ( is_numeric( $order ) || is_string( $order ) ) {
$order = new WC_Order( $order );
}

if ( isset( $order ) && $order->get_payment_method() ) {
switch ( $order->get_payment_method() ) {
case 'monei_bizum':
Expand Down

0 comments on commit a1a5e73

Please sign in to comment.