WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Order Item Data - WC2 (2 posts)

  1. ardziej
    Member
    Posted 1 year ago #

    Hi, I want to upgrade my plugin for Woocommerce 2.0, but I don't know how I can use new Order Item Data ?
    Any samples code ?
    In old way everthing is okay.

    Some code. It's doesn't add record to database.

    add_action( 'woocommerce_add_order_item_meta', 'my_plugin_add_order_item_meta', 10, 2 );

    function

    woocommerce_add_order_item_meta( $item_id, '_qty555', apply_filters( 'woocommerce_stock_amount', $values['quantity'] ) );
    do_action( 'woocommerce_add_order_item_meta', $item_id, $values );

    http://wordpress.org/extend/plugins/woocommerce/

  2. mikejolley
    Member
    Plugin Author

    Posted 1 year ago #

    Take a look at this plugin, it adds meta for orders http://wordpress.org/extend/plugins/woocommerce-product-gift-wrap/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.