Questions tagged [woocommerce]

0

votes
0

answer
2

Views

Add extra meta for shipping method in Woocommerce

I need to add a custom metadata in shipping method. So that another plugin will read this metadata .
user3417598
1

votes
1

answer
202

Views

How to get shipping class name not slug woocommerce

global $product; $shippingClass = $product->get_shipping_class(); this returns the slug but I need the name how do I do this?
1

votes
2

answer
98

Views

How do i show a customer name when they login to woocommerce

I was wondering if anyone can help with the above issue, I somehow need the Account link at the top of the page to display the customers name when logged in, but in all honesty know very little in the way of coding php or js. i'm mostly visual changes, layouts and upkeep of products on here and am w...
Tony 'Sh4rk' Willis
1

votes
2

answer
284

Views

Change color and spacing in Woocommerce review stars

Does anyone know what CSS code I could use to change the colour of my review stars and also space them further apart? I have the code below, but it only changes the outline colour .product .star-rating span:before, .product .star-rating:before { color: #FF0000; } What code would I add to do the wh...
Michelle
1

votes
2

answer
32

Views

How to update user address with wp_update_user [duplicate]

This question already has an answer here: Setting customer user data with CRUD object in Woocommerce 2 answers I have create my own custom sign up form on my website. My website is a WordPress Custom theme with WooCommerce. I am trying to update the users address using wp_update_user but according...
Reece
1

votes
1

answer
52

Views

Change wc_cart_totals_shipping_method_label function in Woocommerce

Inside Woocommerce plugin on the includes subfolder, there's a file wc-cart-functions.php. I would like to change the function wc_cart_totals_shipping_method_label(), but I am not allowed to copy the function to my theme's functions.php. I believe I have to use a custom action/filter to change this...
Danish Muneer
0

votes
0

answer
8

Views

ho to fix "paypal currency converter does not work properly

I am creating eCommerce website but at the last, I have problems related to a Paypal currency converter. In my website main currency is R, we are selling magazine, when we select single copy of the magazine and pay with Paypal then Paypal currency converter is working good but when user select subsc...
andre parker
0

votes
0

answer
4

Views

How to fix Woocommerce price problem ( imported 4 decimal places, but want to display with 2 )

I configure a woocommerce shop. The prices comes from an enterprise software with 4 decimal places. They get written into 'product' forms. Problem is, the 'sales offer' will not display correct. It only will display correct, if I change the value for example from 9.9451 to 9.90. The decimal place se...
Pikheat
1

votes
1

answer
649

Views

Changing structure of WooCommerce shortcode

I have installed WooCommerce on my page, and I'm displaying features posts using shortcode inside of a php file.
BrS
1

votes
3

answer
2.5k

Views

Woocommerce : Remove required field from form-edit-account.php

I tried to remove firstname , lastname and email fields from form-edit-account.php in woocommerce but when I submit form I got some errors from woocommerce form validation! how can I remove validation of this fields? i searching to much and check woocommerce hooks document , but I can't find anythin...
M.D
0

votes
0

answer
2

Views

P tags not rendering in WordPress/WooCommerce

Crazy as this sounds, instead of trying to remove WYSIWYG formatting code, I'm trying to get it to work. I have: echo wpautop($product->get_description()); in my single-product page (well, buried in my functions.php but gets into a custom action on that page). Which gets the right text, but the...
Randy Hall
1

votes
2

answer
1.8k

Views

Get variations IDs from a variable product in Woocommerce 3

It is necessary to get the value from the array with the key [0], but the array is in the object. How can I put it in a variable? WC_Product_Variable Object ( [children:protected] => Array ( [0] => 344 [1] => 345 ) [visible_children:protected] => Array ( [0] => 344 [1] => 345 )
Aleks Pvn
1

votes
2

answer
93

Views

Get order item line total formatted in Woocommerce

I've this code on my Website: $order_items = $order->get_items(); foreach ( $order_items as $item_id => $item ) { $item_total = wc_get_order_item_meta( $item_id, '_line_total', true ); } This returns the item total as a float value. But how can I get this now as a formatted value? Currently: 1500 Go...
Mr. Jo
1

votes
2

answer
29

Views

WooCommerce - How to only show sale price if it is defined? Otherwise only show regular price

So, I have this code in my homepage for the featured products in WooCommerce, and it's working but the thing is I need them to hide the sale price if it's null or it's not defined. Here's what I got so far: I need a code that can check if there is a sale price and show: And if there isn't a sale pri...
Joana Esteves
1

votes
1

answer
748

Views

Add text for specific product category in Woocommerce [duplicate]

This question already has an answer here: Targeting product terms from a custom taxonomy in WooCommerce 1 answer I'm trying to add some text only on the specific products of determinate category in woocommerce, I tried to add this code in plugins/woocommerce/single-product/meta.php but don't work:...
delfinoweb
1

votes
1

answer
80

Views

Remain constant Woocommerce prices regardless of tax rate - B2C

Note - im new, so please be kind. If anything isnt clear please tell me, so i can improve my questioning! As a person who lives in europe and sells products to end-consumers, the following problem is very ipmortant and in my opinion heavily under-prioritised. There are a lot of conversation regardin...
evavienna
9

votes
1

answer
20k

Views

Get in WooCommerce cart the product ID of a cart item

$cart_item = $woocommerce->cart->get_cart(); I have the above code. if I run print_r on cart_item I get a multi dimensional array: Array( [a6292668b36ef412fa3c4102d1311a62] => Array ( [product_id] => 6803 How do I get the product_id only? I tried $test = $cart_item['data']; pr...
Kevin.a
1

votes
0

answer
117

Views

Woocommerce Bookings Product Available Between Two Timestamps

I'm trying to see if a woocommerce booking timeslot is available bewteen two times. For example, I have a bookable product that is available 9:00am - 9:15am 12/27/17, when passing the unix timestamp for 9:00am 12/27/17 and 9:15am 12/27/17 i should receive true, else false. I've tried wc_bookings_ge...
Viking Mann
1

votes
0

answer
48

Views

mod a Functions for Wp All Import

i need to ad to wp all import the field '_ebay_ean' for every variations, i finded this functions:
Vito Santimone
1

votes
0

answer
504

Views

WooCommerce. How to add a wrapping div around single pages product descriptions?

I am looking for a filter/hook to wrap some extra div around my woocommerce single pages product descriptions included to the tabs. Right now i have Product Title My Product Description Text And thats what i would like to achieve instead Product Title My Product Description Text So the container j...
romu
1

votes
1

answer
145

Views

Add woocommerce variation meta data to order

I'm creating a Woocommerce webshop for a client who is selling different types of breakfasts. Each breakfast has several variations based on the amount of persons. For example: Breakfast x (product) - 1 person (variation) - 2 persons (variation) - 3 persons (variation) - 4 persons (variation)...
NVL-IT-Solutions
1

votes
1

answer
502

Views

form checkout template file in avada theme

I’d like to edit the 'checkout' default WooCommerce form (fields like : billing address, first name, second name...etc.), but woocommerce template file form-checkout.php is not present in Avada Theme; other template files in woocommerce/checkout folder does not contain code for checkout form gener...
Ala Dyn
1

votes
0

answer
153

Views

Woocommerce Sold Individually Redirect to cart

So I need your help. I am trying to use the following code in my function php: add_filter('woocommerce_add_to_cart_sold_individually_found_in_cart', 'sold_one'); function sold_one() { if ( $found_in_cart ) { $url='/my.domain/cart'; return $url; }} The idea was to have a product sold individually by...
Wildzhen
1

votes
0

answer
319

Views

adding product using woocommerce rest api too slow

I am trying to add a WooCommerce product from one Wordpress site to another using WooCommerce Rest API with NodeJS module. https://www.npmjs.com/package/woocommerce-api It takes more than 2 minutes to add only 10 products I need a solution for this I think it should take just 1,2 second at most to...
Abdelrhman Elgreatly
1

votes
2

answer
331

Views

How to integrate wooCommerce into non-wordpress site

I'm totally new to this, how should I start to integrate woocommerce into my localhost for testing on a non-wordpress site? I check online people have mention that to use sub-directory, I have tried it but I am stuck at the logging in with database part. Please advise on how should I do it. Thanks...
wosope
1

votes
0

answer
54

Views

Woocommerce 3.2.6 jQuery Not Loading After Update

I am currently running Wordpress 4.9.1 My Woocommerce has been updated to the latest version (3.2.6), and now my website is broken. All images fail to load, buttons don't work. I can see the problem in my Console is that jQuery is no longer loading. If I look at the page source, I can see that the U...
Jethro Hazelhurst
1

votes
0

answer
270

Views

Woocommerce Shipping Calculator not showing country drop down on cart page

I don't know if the issue is because of the theme I'm using. The problem is that the 'calculate shipping' option on my cart page doesn't allow users to select or type in a country - it only shows county or postcode. This doesn't matter for people who are ordering items for themselves, but if they wa...
Clare Bonthrone
1

votes
0

answer
147

Views

how to add filter by attribute to woocommerce in admin panel

is there any way to add filter (search) by attribute function in the woocommerce admin panel something like that:
adek44
1

votes
0

answer
477

Views

Wordpress Woocommerce Custom Search with Category Input Issue

Im building a custom Woocommerce (product) search form in additon to my default blog posts search function. I will display both search forms on the same page. The search form should also allow a search in a predefined product category wich is selected by a dropdown. Unfortunately the search in the c...
evavienna
1

votes
1

answer
101

Views

How to search product on basis of it's attribute via api for woocommrce?

I have been searching product on basis of their attribute by the refference of woocommerce v1 api documentation.following is the sample code that i tried $args = array( 'page' => '1', 'status' => 'publish', 'attribute' => Array ( 'name' => 'Color', 'options' => Array('Loft Gray') ) ); $getProducts...
Pranav Patel
1

votes
0

answer
311

Views

Gateway Timeout when trying to pay via PayPal or Stripe in Woocommerce. How to fix error?

I get a Gateway Timeout error when I try to pay via PayPal or Stripe in Woocommerce. Tried to disable plugins - it did not help. How can I fix this problem?
spoilt
1

votes
1

answer
78

Views

WooCommerce custom mail different price than the customer

I am buying products with 20% discount and resell them for a normal price on my website. I want to make a extra email that has to be send to my own email address when a customer makes a order on my website. My question: If it’s possible to make a new email that will send the normal payment det...
Pim Hoek
1

votes
1

answer
541

Views

Get the Login and Register Form side by side in Woocommerce

Hi I'm using WooCommerce for my Wordpress website. The My-Account Page shows a Login and Register Form, if you are not logged in. For some reason the register form is under the login form. I tried this CSS: .woocommerce-account .col-1, .woocommerce-account .col-2 { width: 10%; float: left !important...
yannistrom
1

votes
1

answer
732

Views

Update product in cart from checkout page woocommerce

I am trying to update the product in the cart from the checkout page before proceeding the payments (from order review table) using ajax. But am unable to do it. 1.first place i am add to cart with custom meta this function. ///Store the custom field add_filter( 'woocommerce_add_cart_item_data', 's...
Harendra Singh
1

votes
1

answer
89

Views

Need std code based on ip country to be prefix with phone field on woocommerce checkout field

https://dev.clipcertification.com/checkout/ I want to prefix std code with Phone field based on ip country, Eg: If user's ip country is india, there will be a field before Phone, which will display +91 and so on. How to achieve? Please help
Neha Goyal
1

votes
0

answer
177

Views

Change zip-code text field to Select Option field in checkout form (shipping not working)

In Woocommerce, I change zip code text field name to City then i change to select field option field. but now have problem in shipping : There are no shipping methods available. Please ensure that your address has been entered correctly, or contact us if you need any help. What should i do? view im...
walid bejaoui
1

votes
0

answer
285

Views

PayPal does not support your store currency. Woocomerce

I have this error on my woocommerce web site: Gateway Disabled: PayPal does not support your store currency. Anyone have a specific solution or any wp plugin for this? How do I work around this? There must be a way... I am using currency Saudi United Arab Emirates Dirham (د.إ). Thanks
Suhan Alam Rana
1

votes
2

answer
384

Views

Conditional custom New Order Woocommerce email notification on different recippients

Okay I have had a question come from a client that doesn't seem impossible, but correctly setting up the conditions is a problem for me. Here is what is happening and what I need. i would really this to be a function of possible. The store has a user hierarchy. There are 2x Super Admins (ID: admin),...
Jody B Roach
1

votes
1

answer
1.2k

Views

Customize the selected product variation prices in WooCommerce

Essentially I am trying to figure out where variation data is calculated and displayed into the html when a user makes her selection. This is my shop link. The specific Price I am refering to: Basically I want to find out where this data is plugged in and where I can modify it. That the data is impo...
gregbast1994
1

votes
0

answer
407

Views

How to send “Customer Invoice” emails with Pay Later (pending status) gateway

I have created a new payment gateway plugin that allows customers to pay later. I will be using it with a woocommerce POS system. I cannot get the 'customer invoice' email to send automatically - I believe it has something to do with the 'pending' status of the order (which it must have in order to...
Jeffrey Fong

View additional questions