Vi har satt opp Vipps som checkout for v?r butikk, men vi har st?tt p? et problem. N?r en kunde g?r til checkout, opprettes ordren og varen reserveres mot salg. Mange kunder fullf?rer ikke ordren, og dette f?rer til at varer med for eksempel 1 igjen p? lager, ikke kan kj?pes av andre f?r ordren kanselleres. Dette tar som standard én time, noe som p?virker salget v?rt negativt.
Er det mulig ? redusere denne tiden f?r ordre kanselleres? Har dere en hook eller et annet oppsett som lar oss justere dette, slik at ufullf?rte ordrer kanselleres etter bare fem minutter?
Takk for hjelpen!
]]>Thanks for a great plugin, made the integration with the Nets payment portal really smooth and easy!
We’re facing an issue that uncaught errors get raised whenever we set an order from the status “processing” to “cancelled” in WooCommerce if the order has already been manually refunded in the official Nets Easy control panel (https://portal.dibspayment.eu/) before we attempt to cancel the order in WooCommerce.
Uncaught Error: Cannot use object of type WP_Error as array in <site>/public_html/wp-content/plugins/dibs-easy-for-woocommerce/classes/class-nets-easy-order-management.php:140
Stack trace:
#0 <site>/public_html/wp-includes/class-wp-hook.php(309): Nets_Easy_Order_Management->dibs_order_canceled(9292)
#1 <site>/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 <site>/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 <site>/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(364): do_action('woocommerce_ord...', 9292, Object(Automattic\WooCommerce\Admin\Overrides\Order))
#4 <site>/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(222): WC_Order->status_transition()
#5 <site>/public_html/wp-content/plugins/woocommerce/includes/admin
WordPress-version 6.0.1
Nets Easy for WooCommerce (version 2.0.1)
PHP-version 7.4.30
When a customer cancels their order (via PayPal Standard Checkout), they return back the their cart and see a big red error message “Your order can no longer be cancelled. Please contact us if you need assistance.” Even though the order successfully cancels.
I’ve had numerous anxious customers contact us to ensure the order was cancelled after seeing this message and I am wondering why it shows up?
Is there any way to remove this notice completely?
Paypal is the only method of payment we accept. The notice always comes up when a customer clicks checkout with PayPal, gets taken to the Paypal checkout process, then clicks “cancel and return to merchant”.
All plugins are up to date.
Any help on these error messages is greatly appreciated, thank you!
]]>When a customer wants to cancel an order and I set the order on “Cancelled”, the total amount wont go off from my total revenue, how do I fix this?
]]>I found a solution: I have a permalinks structure “/%postname%”, if I change it to “/%postname%/” it works well.
But can this work with the “/%postname%” permalinks structure?
With this code, I have been able to echo the right info to the screen when I cancel a booking. Now I just have to find out how to create a coupon in the right customer account.
Any thoughts?
This is the code I have put in functions.php file in the child theme:
add_action(‘woocommerce_booking_cancelled’, ‘cancelled_info’, 10, 2);
function cancelled_info($booking_id, $booking)
{
// Create random coupon code
$characters = “ABCDEFGHJKMNPQRSTUVWXYZ23456789”;
$char_length = “8”;
$random_cupon_code = substr(str_shuffle($characters), 0, $char_length);
// Get the user ID from the Booking ID
$user_id = get_post_field(‘post_author’, $booking_id);
$coupon_code = $random_cupon_code;
$download_credits = get_post_meta($booking_id, ‘_booking_cost’, true);
/**
* Create a coupon programatically
*/
$amount = $download_credits; // Amount
$discount_type = ‘fixed_cart’; // Type: fixed_cart, percent, fixed_product, percent_product
$coupon = array(
‘post_title’ => $coupon_code,
‘post_content’ => ”,
‘post_status’ => ‘publish’,
‘post_author’ => 1,
‘post_type’ => ‘shop_coupon’
);
$new_coupon_id = wp_insert_post($coupon);
// Add meta
update_post_meta($new_coupon_id, ‘discount_type’, $discount_type);
update_post_meta($new_coupon_id, ‘coupon_amount’, $amount);
update_post_meta($new_coupon_id, ‘individual_use’, ‘no’);
update_post_meta($new_coupon_id, ‘product_ids’, ”);
update_post_meta($new_coupon_id, ‘exclude_product_ids’, ”);
update_post_meta($new_coupon_id, ‘usage_limit’, ‘1’);
update_post_meta($new_coupon_id, ‘usage_limit_per_user’, ‘1’);
update_post_meta($new_coupon_id, ‘expiry_date’, ”);
update_post_meta($new_coupon_id, ‘apply_before_tax’, ‘yes’);
update_post_meta($new_coupon_id, ‘free_shipping’, ‘no’);
echo “Verdi: ” . $download_credits . “coupon id: ” . $new_coupon_id . “coupon code: ” . $coupon_code;
}