Hot answers tagged

2

Fixed query select p.ID as order_id, p.post_date, i.order_item_name, max( CASE WHEN im.meta_key = '_product_id' and i.order_item_id = im.order_item_id THEN im.meta_value END ) as Prod_ID from wp_posts as p, wp_postmeta as pm, wp_woocommerce_order_items as i, wp_woocommerce_order_itemmeta ...


2

Many thanks to Nathan Powell for the fix. Changing get_stylesheet_directory() to get_stylesheet_directory_uri() will return the correct URL. get_stylesheet_directory() returns the absolute server path to child or parent theme (hence my previous issue) whereas get_stylesheet_directory_uri() returns the properly formed URI of child or parent theme. I ...


2

The code you have provided is incomplete. Not sure if that is the only code you are using to achieve what you want. So, besides first code block which you have provided, bellow I am adding all rest of the code which is required to show the new field on backend in 'Order Details' box and make it editable through custom fields. Please note, in your second code ...


1

It is all fine. You just need to declare variable global first then you can set the value of this and access globally. function my_free_shipping( $is_available ) { global $woocommerce, $product_notfree_ship; // set the product ids that are $product_notfree_ship $product_notfree_ship = array( '1', '2', '3', '4', '5' ); Then again declare it globally when ...


1

Unfortunately there is no hook available to remove that "Our Bank Details" text. But, you can hide the default which is added and un-intended area by placing following rule in your theme's style.css file: .woocommerce-order-received .woocommerce h2:nth-of-type(2) { display: none; } Then to have "Our Bank Details" at intended place, simply go to ...



Only top voted, non community-wiki answers of a minimum length are eligible