vendredi 10 juin 2016

How to get categories from an order at checkout in WooCommerce?

I am want to get the category of the items in the cart at the checkout in WooCommerce. I want to extract it and then place it in a field in my custom checkout. I'm using WooCommerce MultiStep Checkout Wizard premium plugin and this specific action/hook:

add_action('woocommerce_multistep_checkout_before_order_info', 'destinationStep');

I'm a little lost and can't find much documentation for what I need to use to get it.

I'm trying to just get items to appear but I just get an empty array.

$order = new WC_Order( $order_id );
$items = $order->get_items(); 
var_dump($items);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire