hook-woocommerce

Get the order ID in checkout page before payment process

瘦欲@ 提交于 2020-04-28 08:17:09
问题 In WooCommerce, I need to get order ID right in checkout page of WooCoommerce, before payment, when the order is created. I look at all sessions and tried to find out when order goes for payment in order_awaiting_payment session, but I need it before going for payment. So I think about a solution that is make order when checkout page loaded (In fact make it ready for payment) and when checkout real complete update it. How to get order ID in checkout page before order go for payment in

I'm collecting meta key data, and I want to display it in the WordPress dashboard

我的梦境 提交于 2020-04-18 05:46:03
问题 I found, and modified this for my needs, and put it in my functions.php: add_filter( 'manage_edit-shop_order_columns', 'MY_COLUMNS_FUNCTION' ); function MY_COLUMNS_FUNCTION( $columns ) { $new_columns = ( is_array( $columns ) ) ? $columns : array(); unset( $new_columns[ 'order_actions' ] ); //edit this for your column(s) //all of your columns will be added before the actions column $new_columns['dname'] = 'Dogs Name'; $new_columns['additional_allergies'] = 'Allergies'; //stop editing $new

Get user meta data from woocommerce_created_customer hook in Woocommerce

*爱你&永不变心* 提交于 2020-04-13 07:12:27
问题 I am using woocommerce API to create a customer API is working fine and the new customer is creating fine into WP. But the issue is when I am using a hook "woocommerce_created_customer" I am not able to get user meta data like "first name", "last name" etc Here is a part of my code: ``` $this->loader->add_action( 'woocommerce_created_customer', $plugin_admin, 'add_user_to_zendesk', 50 ); public function add_user_to_zendesk( $user_id ) { if ( isset( $user_id ) && ! empty( $user_id ) ) { $user

Restrict user role to change only some order statuses in Woocommerce [closed]

别说谁变了你拦得住时间么 提交于 2020-04-06 20:34:07
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I would like to restrict access by role to certain order statuses from the dropdown list in woocommerce. I have tried in functions.php child theme the code on Restrict woocommerce order status by role but cannot get it to work and do not have enough rep to post a comment. https:/

Restrict user role to change only some order statuses in Woocommerce [closed]

我只是一个虾纸丫 提交于 2020-04-06 20:33:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I would like to restrict access by role to certain order statuses from the dropdown list in woocommerce. I have tried in functions.php child theme the code on Restrict woocommerce order status by role but cannot get it to work and do not have enough rep to post a comment. https:/

How can I add html code on WooCommerce after single product summary

喜夏-厌秋 提交于 2020-03-14 05:35:30
问题 How can I add HTML code on woocommerce after a single product summary? Here is the screenshot: Regards Golam Rabbi 回答1: add_action( 'woocommerce_product_after_tabs', 'my_product_after_tabs' ); function my_product_after_tabs() { echo 'html'; } Or when overwriting and adjusting https://github.com/woocommerce/woocommerce/blob/master/templates/single-product/tabs/tabs.php https://github.com/woocommerce/woocommerce/blob/master/templates/single-product/related.php 回答2: add_action( 'woocommerce

How can I add html code on WooCommerce after single product summary

限于喜欢 提交于 2020-03-14 05:35:01
问题 How can I add HTML code on woocommerce after a single product summary? Here is the screenshot: Regards Golam Rabbi 回答1: add_action( 'woocommerce_product_after_tabs', 'my_product_after_tabs' ); function my_product_after_tabs() { echo 'html'; } Or when overwriting and adjusting https://github.com/woocommerce/woocommerce/blob/master/templates/single-product/tabs/tabs.php https://github.com/woocommerce/woocommerce/blob/master/templates/single-product/related.php 回答2: add_action( 'woocommerce

Woocommerce Checkout page shows Order summary 2 times?

ぃ、小莉子 提交于 2020-03-03 07:02:07
问题 On the checkout page when user checkbox for the shipping details the order summary doubles. I have done many modifications in the in past. So i think i made mistake.On clicking shipping information checkbox. the order summary becomes double. only subtotal, shipping and total. I am providing review-order.php code. I think the problem is in after the end of table tag. <?php /** * Review order table * * This template can be overridden by copying it to yourtheme/woocommerce/checkout/review-order

Allow customer to change the order status in WooCommerce My account

醉酒当歌 提交于 2020-02-23 04:05:55
问题 Looking to create a custom order process that looks like this: Customer adds item to cart During Checkout Process customer uploads design to order On Checkout payment is verified, but not captured After design is finalized by the company, they upload the proof for customer review the customer reviews proof on their dashboard, and clicks a button that processes the order and captures payment I have figured out everything i need to make this happen except for how to allow the customer to change

How to remove woocommerce added cart items and redirect to checkout?

一世执手 提交于 2020-02-05 08:42:09
问题 I have a Woocommerce form to 'Add Funds'. It has an amount input field ($20, $30 ...etc.) and a submit button that redirects to cart page with the input amount as total. Redirect to checkout is working, but the cart items are not getting removed if a user abandons the cart and tries to order again. I tried numerous solutions for the redirect to checkout, but only one worked. Working solution for redirect to checkout: WooCommerce - Skip cart page redirecting to checkout page Solutions not