I would like to change the status of every new WooCommerce order depending on a custom field (shopart) with PHP. I already tried to write a function in the functions.php file but I failed. Answer
Tag: metadata
Add Term Meta from Custom Taxonomy to Cart Item
What I’m trying to accomplish is adding term meta from a custom taxonomy that is attached to a product and display it on the cart/checkout/ order details/email notification. I’m not the greatest at this but know enough to get by. What I’m using is the ‘Perfect Brands WooCommerce’ plugin that adds in the “pwb-brand”. I’ve also added in my own
How to get custom fields values from WooCommerce orders
I have checked similar questions but couldn’t resolve the problem. This is my code so far: It is giving me this error: “billing_vergi_dairesi was called incorrectly. Order properties should not be accessed directly”. So I replaced $order->billing_vergi_dairesi; and $order->billing_vergi_no; with $order->get_billing_vergi_dairesi(); and $order->get_billing_vergi_no(); Then I got: “uncaught Error: Call to undefined method”. What I am doing wrong? Answer Since WooCommerce
Display product custom field as order item meta on WooCommerce admin order pages
I have created my woocommerce products (fruits and vegetables) with a bunch of custom meta data I can correctly input and display them on my website. One of this data is the unit (ie kilos, box of 6, …
Save product custom field value as custom order item meta in WooCommerce
I have problem with custom field in woocommerce (latest version). I need your help. My code function completed_order($order_id) { $order = wc_get_order( $order_id ); $customer_id = $order->…
WordPress hook for newly published post that can access to post metadata
I need to do some actions only on newly published posts that requires post metadata. I’ve tried many different hooks, but they all also trigger for other “events” like updating post, or if they …
Meta description for index page not appearing in laravel framework
I have 3 sets of URL (index page, detail page and review page). For detail page and review page, meta description are appearing but not in index page. @if(strpos(Route::getFacadeRoot()->…
Filter out unwanted order item meta data from Woocommerce email notifications
In the order email templates (for example email-order-items.php), WooCommerce uses the function wc_display_item_meta to display product details in the order table. The function code is present in the wc-template-functions.php file (line number 3011). I am copying the function code below for reference The problem is: it doesn’t take any arguments that can help me filter out item data that I
Use custom meta data in a WC_Product_Query on Woocommerce 3
I used to use the standard wordpress WP_Query to fetch woocommerce products based on meta data. My products are tracks and have many meta columns (like genre, instrument, mood, etc). Using WP_Query I can create a meta_query based on user input from a form, that searches for products that meet the meta requirements. All of this works great. Now I
get meta description , title and image from url like facebook link sharing
my code is function getTitle($Url){ $str = file_get_contents($Url); if(strlen($str)>0){ preg_match(“/