Skip to content

Commit

Permalink
Merge pull request #280 from razorpay/callback-bug-fix
Browse files Browse the repository at this point in the history
Bug fix in callback
  • Loading branch information
ChetanGN authored May 21, 2022
2 parents ea2d565 + a352ca2 commit 55a752b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion woo-razorpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,9 @@ function check_razorpay_response()

$postData = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_status FROM $wpdb->posts AS P WHERE post_type=%s AND post_password = %s", $post_type, $post_password ) );

if (count($postData[0]) > 0)
$arrayPost = json_decode(json_encode($postData), true);

if (!empty($arrayPost) && count($arrayPost[0]) > 0)
{
$orderId = $postData[0]->ID;

Expand Down

0 comments on commit 55a752b

Please sign in to comment.