• Resolved kassilukraine

    (@kassilukraine)


    Hello @flinnn Don’t know why, but Auto Complete Donations doesn’t work for my site. The latest plugin version is 1.3.1
    The product is marked as virtual, but when the donation goal is reached, it does not change.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author flinnn

    (@flinnn)

    Hi kassilukraine,

    thanks for reaching out.
    I’m not sure if I understand correctly.
    Do you want to auto complete donations (aka automatically set status of the order to completed): https://wcdp.jonh.eu/documentation/advanced/auto-complete-donations/ Or do you want to set the status of the project to fully funded (and disable new donations to this project) after the goal is reached?

    Best,
    Jonas

    Thread Starter kassilukraine

    (@kassilukraine)

    Hello Jonas.

    Yes, I meant auto-complete donation. That is, when the entire amount is collected, the collection of donations should end (I checked and if you set the product to “out of stock”, then the donation form is hidden, except for the progress bar), but when I reach 100%, the status of the product does not change to finish the donation

    Plugin Author flinnn

    (@flinnn)

    Hi kassilukraine,

    Donation Platform for WooCommerce does not yet offer such a feature. I’m constantly trying to improve the documentation. Why did you think that Donation Platform for WooCommerce offers this feature?

    Best,
    Jonas

    Thread Starter kassilukraine

    (@kassilukraine)

    @flinnn hey Jonas.

    I find solutions for autocomplete

    add_action('woocommerce_order_status_processing', 'auto_complete_processing_orders');
    
    function auto_complete_processing_orders($order_id) {
        if (!$order_id) {
            return;
        }
        $order = wc_get_order($order_id);
       if ($order->get_status() == 'processing') {
            
            $order->update_status('completed', 'Complete auto.');
        }
    }

    its work, maybe its help someone)

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.