All Questions

19
votes
2answers
40975 views

How to get WooCommerce order details

How can I get WooCommerce order details by order id. I tried this but did not work for me. $order = new WC_Order( $order_id );
14
votes
1answers
5625 views

WooCommerce: Auto complete paid Orders (depending on Payment methods)

Normally wooCommerce should autocomplete orders for virtual products. But it doesn't and this is a real problem, even a BUG like. So at this point you can find somme helpful things(but not really con...
4
votes
2answers
1033 views

Get Order items and WC_Order_Item_Product in Woocommerce 3

Ok, reading up on the changes in Woocommerce 3.0+, it seems that you can not access this class directly anymore, so I would assume that this code needs to be changed, since it is spitting out an error...
29
votes
10answers
95949 views

Woocommerce getting custom attributes

I am trying to get products custom attribute values but i am miserably failing to do so. i tried to do global $woocommerce, $post, $product; $res = get_post_meta($product->id); print_r(unseriali...
29
votes
9answers
41597 views

WooCommerce: Add product to cart with price override?

$replace_order = new WC_Cart(); $replace_order->empty_cart( true ); $replace_order->add_to_cart( "256", "1"); The above code add product 256 to the Cart 1 time. But the issue I'm having is tha...
7
votes
2answers
15477 views

Add a Variation to Cart using AJAX - WooCommerce API?

I have an item with the following data : var item = { id : "124", name : "xxx", price : "13.13", quantity : 1, options : { "size" : "xl", "color": "pink" } }; When the user clic...
2
votes
2answers
2656 views

Replace the Variable Price range by the chosen variation price in WooCommerce 3

On WooCommerce I would like to change the Variable single product page layout. Because, when you have an variable product you get this wired price rage ( below product title ) in the Variable Product ...
0
votes
1answers
6715 views

WooCommerce: Add fees to card based on payment gateway selected

I need to add a credit card fee % based depending on what payment method the customer selects at the shopping cart in WooCommerce. This needs to be added to the shopping cart total so that it sends t...
1
votes
2answers
1077 views

Reordering checkout fields in WooCommerce 3

I'm trying to re-order 2 custom checkout fields added with the help of woocommerce_checkout_init filter, just that when I apply woocommerce_checkout_fields filter to re-order fields, it doesn't recogn...
11
votes
2answers
11883 views

WooCommerce: Assigning an endpoint to a custom template in my account pages

This function adds a tab named "Special Page" into "My Account" tab list: add_filter( 'woocommerce_account_menu_items' , 'jc_menu_panel_nav' ); function jc_menu_panel_nav() { $items = array( ...

Previous Next