<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>Úhrada FA v SuperFakture cez objekt WC_Order

[ad_1]

Replies: 1

Dobrý deň, potrebovali by sme pri prehodení do custom stavu urobiť úhradu FA v SuperFaktúre.

Skúšame to nejako takto, ale nemá to efekt.

function my_woocommerce_order_status_changed( $order_id, $old_status, $new_status )
{
    if ( $old_status == 'stary_status' && $new_status == 'novy_status' )
    {

        $order = new WC_Order( $order_id );

        $order->payment_complete();

    }
}
add_action( 'woocommerce_order_status_changed', 'my_woocommerce_order_status_changed', 99, 3 ); 

Vedeli by ste prosím poradiť, kde robíme chybu, resp. ako to urobiť? Vopred ďakujem!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer