Fakturoid WooCommerce state

0.0/5
<?php
//$status = apply_filters( 'fakturoid_webhook_paid_status', 'completed', $order  );

add_filter( 'fakturoid_webhook_paid_status', 'toret_fakturoid_webhook_paid_status', 10, 2 );
function toret_fakturoid_webhook_paid_status( $status, $order ){
	$order = wc_get_order( $order_id );
	if (get_post_meta( $order->id, '_shipping_country', true ) == "UK") {
		return "on-hold";
	}
	if ($order->get_meta('_payment_method') == 'dobirka') {
		return 'completed';
	} else {
		return 'processing';
	}

}

Comments and reviews

{{ reviewsTotal }} Review
{{ reviewsTotal }} Reviews
{{ options.labels.newReviewButton }}
{{ userData.canReview.message }}

Description

This snippet was fetched automatically from WPDistro.cz projects.

Author

Tags

This snippet is untagged