Changeset 3388904
- Timestamp:
- 11/03/2025 01:44:42 PM (4 months ago)
- Location:
- woo-razorpay/trunk
- Files:
-
- 3 edited
-
includes/api/order.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
woo-razorpay.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-razorpay/trunk/includes/api/order.php
r3324918 r3388904 81 81 $orderId = $checkout->create_order(array()); 82 82 83 if (is_wp_error($orderId)) { 84 $checkout_error = $orderId->get_error_message(); 83 if (is_wp_error($orderId) || empty($orderId)) { 84 $checkout_error = is_wp_error($orderId) ? $orderId->get_error_message() : "Invalid order ID returned"; 85 rzpLogError("WooCommerce Order Creation Failed: " . $checkout_error); 86 87 $response = [ 88 'status' => false, 89 'message' => "Unable to create WooCommerce order: " . $checkout_error, 90 'code' => 'ORDER_CREATION_FAILED', 91 ]; 92 $status = 500; 93 94 return new WP_REST_Response($response, $status); 85 95 } 86 96 //Keep order in draft status untill customer info available … … 95 105 $orderId = $checkout->create_order(array()); 96 106 97 if (is_wp_error($orderId)) { 98 $checkout_error = $orderId->get_error_message(); 107 if (is_wp_error($orderId) || empty($orderId)) { 108 $checkout_error = is_wp_error($orderId) ? $orderId->get_error_message() : "Invalid order ID returned"; 109 rzpLogError("WooCommerce Order Creation Failed: " . $checkout_error); 110 111 $response = [ 112 'status' => false, 113 'message' => "Unable to create WooCommerce order: " . $checkout_error, 114 'code' => 'ORDER_CREATION_FAILED', 115 ]; 116 $status = 500; 117 118 return new WP_REST_Response($response, $status); 99 119 } 100 120 //Keep order in draft status untill customer info available … … 303 323 { 304 324 $order = wc_get_order( $orderId ); 325 326 if (is_object($order) === false) { 327 return; 328 } 329 305 330 if (isHposEnabled()) { 306 331 $order->update_status($orderStatus); -
woo-razorpay/trunk/readme.txt
r3350444 r3388904 4 4 Requires at least: 3.9.2 5 5 Tested up to: 6.8 6 Stable tag: 4.7. 76 Stable tag: 4.7.8 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 69 69 70 70 == Changelog == 71 72 = 4.7.8 = 73 * Fixed fallback to native checkout. 74 * Fixed duplicate checkout button. 71 75 72 76 = 4.7.7 = -
woo-razorpay/trunk/woo-razorpay.php
r3350444 r3388904 4 4 * Plugin URI: https://razorpay.com 5 5 * Description: Razorpay Payment Gateway Integration for WooCommerce.Razorpay Welcome Back Offer: New to Razorpay? Sign up to enjoy FREE payments* of INR 2 lakh till March 31st! Transact before January 10th to grab the offer. 6 * Version: 4.7. 77 * Stable tag: 4.7. 76 * Version: 4.7.8 7 * Stable tag: 4.7.8 8 8 * Author: Team Razorpay 9 * WC tested up to: 10. 1.19 * WC tested up to: 10.3.4 10 10 * Author URI: https://razorpay.com 11 11 */ … … 3521 3521 function addPdpCheckoutButton() 3522 3522 { 3523 // Runs only on the main single product page (not loops, quick view, or upsells) 3524 if ( ! is_product() || ! did_action( 'woocommerce_before_single_product' ) ) { 3525 return; 3526 } 3527 3523 3528 if (isTestModeEnabled()) { 3524 3529 $current_user = wp_get_current_user();
Note: See TracChangeset
for help on using the changeset viewer.