Skip to content

Commit a3f92a1

Browse files
angbpyChetanGN
andauthored
1cc cart bounty CRITICAL fix (#318)
* Saving CartBounty abandonment data for compatibility * CartBounty compatibility * Removed white-spaces * restructured the code and removed whitespaces * removed trailing whitespaces * added conditional to correct position maintaining formatting * added session-id info * Added new logic for sessionID * new logic for logged-in user * updated save abndment data * updated recover logic * updated woo-razorpay file for recovered query on CartBounty * Updated CartBounty save abandonment and URL redirection * Removed stylehandler logic from CartBounty PR * save abandonment stash * stash * CB removed stylehandler * removed include statements of non-existing files * updating cb status * Fixed duplicate Order ID issue in order.php using order ID from transient * Order ID hash fix * Fixed mobile number not updating error * empty email fix * cleaning cb code * removed log messages from code * removed whitespaces * cleaned code format and removed print_r statements * fixed according to comments * Removed repeated code for same variable * removed unused lines * changed function names to camel case * fixed formatting * changed variable names to camelCase and handleOrder function name * update refactor * update refactoring * used cartbounty functions if possible and removed repeated functions * updated with all correct usable admin fxns * Formatted * Code format * Added plugin-active check before using filter * Added CB active check before calling handle order Co-authored-by: ChetanGN <[email protected]>
1 parent 0a75e84 commit a3f92a1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

includes/support/cartbounty.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ function getSessionID($orderID)
172172

173173
function handleCBRecoveredOrder($orderID)
174174
{
175+
global $wpdb;
176+
175177
if (!isset($orderID)) {
176178
//Exit if Order ID is not present
177179
return;

woo-razorpay.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,11 @@ public function updateOrder(& $order, $success, $errorMessage, $razorpayPaymentI
13841384
{
13851385
$order->payment_complete($razorpayPaymentId);
13861386
}
1387-
handleCBRecoveredOrder($orderId);
1387+
1388+
if(is_plugin_active('woo-save-abandoned-carts/cartbounty-abandoned-carts.php')){
1389+
handleCBRecoveredOrder($orderId);
1390+
}
1391+
13881392
$order->add_order_note("Razorpay payment successful <br/>Razorpay Id: $razorpayPaymentId");
13891393

13901394
if($this->getSetting('route_enable') == 'yes')

0 commit comments

Comments
 (0)