Detect Woocommerce orders with ‘Origin: Unknown’ and refuse them
I am getting a lot of orders from credit card scammers testing lists of cards by making small orders against my site. The vast majority of these fail, but one or two get through, which means I end up sending out items to people who don’t want them, with all the mess that entails.
How to add custom totals to WooCommerce Analytics dashboard? [closed]
Closed 5 days ago.
WooCommerce – the cart does not allow data to be updated via code
I am using woocommerce 9.1.2 , I created a plugin to change the prices of the products while they are in the cart and complete the order; This is my code:
Show product variation attributes in Order details page and Email
i want the show product variation attribute that the user selected in Order-details page. As you can see in the Screenshots i want the variation in the first screenshot in second and third screenshot.
Show product variation attributes in Order details page and Email
i want the show product variation attribute that the user selected in Order-details page. As you can see in the Screenshots i want the variation in the first screenshot in second and third screenshot.
Woocommerce – Add order weight to order page (HPOS Compatible)
I used to use a plugin to add the total order weight to each order and display it on the orders page on the back end. However, HPOS broke this and I have been trying to write the code to implement it again. I have Frankensteined a few snippets I have found, as my PHP skills are very limited, and this is as far as I have gotten, I just can’t seem to get it to populate the values.
After resubscription in WooCommerce subscription how to fetch the meta data ‘_subscription_resubscribe’
function action_wcs_create_subscription($subscription) { $NewSubscriptionId = $subscription->get_id(); update_option(‘NewSubscriptionId’,$NewSubscriptionId); $order = wc_get_order($NewSubscriptionId); $cancelledSubscriptionId = $order->get_meta(‘_subscription_resubscribe’); update_option(‘cancelledSubscriptionId’,$cancelledSubscriptionId); } add_action(‘wcs_create_subscription’,action_wcs_create_subscription’, 10, 20); I need to fetch the parent subscription id during resubscription process , I used the above hook , which returns the newly created subscription id , also i need to fetch the meta value of ‘_subscription_resubscribe’ , […]
Woocommerce pass more than 1 variable to woocommerce_before_calculate_totals
I am trying to pass 2 variables to woocommerce_before_calculate_totals
Modifying cart total but not order value
I’m using this code to modify my total on the checkout page
However when I place the order, my order confirmation page and the order itself, emails etc reflect the unmodified checkout total
Having difficulty displaying a message in woocommerce at checkout
I am using the following code to make sure that a minimum of two products are purchased from a particular category, if there is less than the minimum added to the cart a message should be displayed upon checkout.