I've been struggling to remove a certain area on the checkout page without success. I attempted using this CSS code: .avada-myaccount-user-column .username { display:none; } https://i.stack.imgur.com/okFg9.png https://i.stack.imgur.com/GisRQ.png Current ...
Based on Unique Checkbox field that adds a product to the cart on Woocommerce checkout page, I have successfully implemented the following code: It enables customers to add a specific product to their cart by simply checking a checkbox. The AJAX feature dy ...
Attempting to implement an AJAX update for the shipping details in my checkout cart... I have set up the necessary function in functions.php function custom_update_shipping() { WC()->cart->calculate_shipping(); echo "hello"; die(); } a ...
Currently, I am facing a challenge in adding content after the page title and changing the style of the page where all products are displayed in WooCommerce. Unfortunately, I am unsure about the location of the file that needs to be copied to my custom t ...
Currently, I am working on customizing the add to cart button on a single product page. After implementing an ajax call solution from LoicTheAztec's post here, I have successfully added the feature. The code works perfectly fine, but now I am faced with t ...
To ensure the address fields are required when a user selects a shipping method other than "local pickup," I need to implement dynamic changes using an action instead of just setting them as optional by default. Currently, I have managed to make the field ...
I need a solution to update products based on their specific category. Currently, I have successfully retrieved the desired results using the following MySQL query: SELECT * FROM wp_posts WHERE post_type = 'product' At present, there are two product cate ...
Hey there, I've been facing an issue with the woocommerce product display grid layout. The items keep getting misaligned, with one on a line and the others right next to each other. I attempted to fix it by adding some custom CSS code: .woocommerce ...
My current challenge involves adding a product to the cart during checkout through an on_click event. The price of this product is calculated dynamically using an external API, causing it to register with a price of 0 in WooCommerce itself. While I have su ...
On the category creation/edition page, I added a custom field using the following code: // Custom Field for Product Category Creation Page function product_cat_new_field_create_page() { ?> <div class="form-field"> <label for=&quo ...
I require assistance for a specific situation. In the context of WooCommerce, when the "Manage Stock" option is enabled for either a simple product or variation, it triggers a notification to display on the product page, as shown in this example. However, ...
How can I display Estimated delivery days below the product title to inform my customers about their order's arrival date, similar to the example on the page included in the link? I would like it to show varying days depending on the shipping class. ...
I've been struggling to pass a dynamically generated custom price stored in a variable to a hooked function within the woocommerce_before_calculate_totals hook in the cart. Unfortunately, my current setup doesn't seem to be working as expected. ...
I have successfully configured all product links on my Woocommerce website to open in a new tab. However, I am encountering an issue with endless scroll and ajax where the newly loaded products do not open in a new tab when clicked on. Below is the curren ...
Is there a way to sort fees by name instead of the default sorting by price in WooCommerce orders? I was able to successfully sort fees by name on the cart and checkout pages using the code provided in the answer located at Reordering multiple fees differ ...
I have encountered another issue. I am attempting to perform a category checkup and provide a positive or negative response with my WooCommerce categories. My goal is to exclude the "accessories" category from my shop page, but only include accessories on ...
If a customer selects a specific business option from the dropdown menu on the product page, I want to send the standard WooCommerce Order Confirmation Email to both the site admin and that selected business. Backpack $50 Choose an Option Business First ...
I'm attempting to add this code into Elementor's Custom Code section in order to modify the Sale Badge Text on WooCommerce add_filter(‘woocommerce_sale_flash’, ‘edit_sale_badge’); function edit_sale_badge() { return ‘TEXT-GOES-HERE’; ...
After updating the WooCommerce version to 3.1.2, I encountered an issue while trying to add or edit a variable product. An error message "Uncaught Error: Option 'ajax' is not allowed for Select2 when attached to a element." appears when selecting a product ...
After purchasing two plugins, Woocommerce Subscriptions and Account Funds, which claim to be compatible in their documentation, I am attempting to create a Simple Subscription product that adds the product price as account funds for the user upon checkout, ...
I prefer a two-column layout for the checkout process on www.narwal.shop/checkout Here is the code I added: /* Large devices (large desktops, 1200px and up) */ @media (min-width: 993px) { /* --------------------- WOOCOMMERCE -------- ...
I have a client who runs a WooCommerce WordPress site and they want the product image/link on the category page to open in a new tab when clicked. I have been attempting to use jquery to achieve this with no success. As I am relatively new to jquery, any a ...
On my quest to showcase the lowest price on category pages instead of a price range, while still displaying the range on individual product pages, I stumbled upon a solution shared by another user: add_filter('woocommerce_variable_price_html', & ...
How can I modify the shopping cart page to remove the "has been added to your cart" text and replace the quantity and add to cart button with a custom button (my image)? Here is an example of what I am trying to achieve: This is the current state of the p ...
I am looking to add a click event to my custom dropdown, which replaces a SELECT element. The purpose of this click event is to trigger the corresponding OPTION item when an LI element is clicked. It seems like Woocommerce uses some JavaScript or PHP func ...
While working on a website, I encountered the need to display products in 2 rows instead of the default 3 for one specific category. After researching on Stack Overflow and Google, I came across this valuable solution: add_filter('loop_shop_columns', 'loo ...
I've implemented code to adjust checkout address fields for more accurate formats in various countries. The segment that updates the labels for UK and New Zealand states is not functioning properly though. In the UK, the County (optional) field retains i ...
I've successfully displayed a product on my homepage using the following shortcode: <?php echo do_shortcode('[product_page id="195"]');?> The product is shown with its main image and small thumbnails below it, and on the right side there i ...
I have successfully implemented adding multiple items with quantities to the cart using AJAX. However, after adding a product, the mini cart is not updating as expected. I am calling WC_AJAX::get_refreshed_fragments() in my function.php and have a hook set ...
In my WooCommerce store, I encountered an issue with a variable product that has 3 product variations. Unfortunately, the quantity to sell for each variation needs to be fixed and cannot be adjusted by the customer. For instance: We have 2 Red items ava ...
Is there a way to trigger an email to be sent to the user when they are about to make a purchase at checkout? I tried implementing this code in my functions.php, but it seems to be sending multiple emails in a random manner. I suspect it may be due to the ...
I have a form that allows users to update their account information. I have implemented ajax requests to save changes without refreshing the page. However, I only want to submit certain fields from the form as some are disabled. The code snippet below is w ...
Recently, I customized the WooCommerce product settings by adding custom fields to the shipping tab. Now, my goal is to display these custom fields on the Product page under the Additional Information tab and ensure that they are automatically included in ...
I have a website located at Within that page, I have included the Cart table using a woocommerce shortcode. Currently, the cart table is positioned below the billing details and payment options section. My goal is to move this cart table to be situated ...
Currently, I am using the Add to cart Ajax callback, but I am facing difficulty in retrieving the post Id from it. MY OBJECTIVE: My intention is to apply the add_filter only on a specific page. Here is the PHP code in functions.php file: add_filter( 'wooc ...
I am currently in the process of integrating NextJS with a backend WooCommerce using GraphQL. One thing that I have been pondering is how to reconfigure the setup. Currently, Wordpress/WooCommerce is set up as follows: mywebwoo.com - default WordPress sto ...
I have implemented custom code to create unique checkout fields based on the number of products in a customer's cart. Each product requires 4 customized checkout fields, displayed in two columns side by side. The expected result is as follows: co ...
Attempting to include product category within the product card on the woocommerce archive page. Currently, it displays "Thumbnail," "Title," "Price," and "Add to cart button." Using a function that should work if the variable "product" is set to the curre ...
I have some code here and I am looking to align the two elements at the bottom, "php echo do_shortcode(wcas-search-form);" and "php do_action('hamzahshop_custom_min_cart');" on the same line horizontally. I am new to this and struggling to figure it out. ...
Is there a way to dynamically update the cart content using AJAX when the 'update cart' button is clicked? I've been struggling to get the $fragments function to work properly, as it always returns true. I've also attempted to use WooCommerce hooks, but t ...
I am looking for a solution to combat fraud on my WooCommerce website. Oftentimes, scammers use automated bots with stolen credit card information to make purchases and have the products shipped to a different address than the billing one. To prevent this, ...
Hi there, I'm trying to find a way to translate a button in my WooCommerce store without using LocoTranslate or any other tools. Is there a PHP function that can help me change the button text without needing an ID? If you want to take a look at the ...
Is it possible to fetch a list of all products in WooCommerce that have been ordered by their popularity (total sales) starting from a specific date? $args = array( 'post_type' => 'products', 'posts_per_page' => 200 ...
Instead of the standard [Remove] option on the WooCommerce checkout page for removing coupons, I would like to change the text to say [Remove & Re-Calculate]. After trying to implement the code below to make this change, the text was successfully upda ...
I am currently facing an issue in WooCommerce where I need to set a different tax class for company users with billing addresses outside of Germany. Normally, the tax rate is always 19%, but in this specific case, I require it to be set at 0%. To achieve t ...
Currently, I am working on a WordPress WooCommerce website and I have encountered an issue. I want to implement a logic where users cannot see product categories, subcategories, or product pages without logging in, and instead be redirected to the login pa ...
Looking to enhance my product page by adding social icons right below the 'Add to Cart' button. The product page URL is https://flowersforeveryone.co.za/product/cheerful-orange-tulips/. I already have a 'social menu' set up. How can I ...
Is there a way to customize product tabs in WooCommerce by adding them based on a specific word in the product title instead of just tags? add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' ); function woo_new_product_tab( $ ...
Is there a way to retrieve specific order items from a particular product category in Woocommerce? I've thoroughly searched through the Woocommerce documentation, but unfortunately, I haven't found any relevant information. Below is my current code snipp ...
My website uses multiple languages (English, French, Serbian) with a WooCommerce setup created using the qTranslate plugin. However, I am facing an issue with translating WooCommerce messages such as cart, checkout, and email contents. I was able to solve ...
I have set my Wordpress site's permalink structure to use the Post name option, resulting in URLs like: http://sitename.com/sample-post/ However, I am encountering an issue when trying to access a page with the "page" argument, such as: http://sitename. ...
I recently added a "New Arrival" product category section on my WooCommerce website. I am looking for a way to automatically hide or remove products from the "New Arrival" category after they have been published for 15 days, while still keeping them visibl ...
I am using Woocommerce along with Woocommerce Bookings, and I am looking to enhance the cart by adding more information once a user has added an item there. Currently, I have the starting date of the booking and its duration displayed with labels. <dl ...
In my current scenario, a non-logged-in user is restricted to adding only one product to their cart. I have implemented a filter on woocommerce_add_to_cart_validation that seems to be working correctly with $woocommerce->cart->cart_contents_count&g ...
I'm currently working on a project that involves WooCommerce integration with WordPress and utilizing GraphQL to retrieve product variations. One issue I've encountered is that the GraphQL API is only returning 10 out of 12 variations for a speci ...
Is there a way to automatically include a personalized message for each order, depending on the payment methods chosen during checkout? The customized note would be displayed as an additional line below the customer's order notes. ...
I am working on a WordPress website that incorporates WooCommerce for its e-commerce features. Within the website, there are three distinct categories, each with its own template assigned to the products within those categories. So far, I have successfull ...
I am currently utilizing the Automattic Client to establish a connection with the wooCommerce Rest API, and most of my requests are functioning as intended. Typically, I make use of the Endpoint wc/v3, but I have switched to wp/v2 because it appears that u ...
After finding code on Stack Overflow to increase the price of a specific product by $10, I encountered an issue when trying to apply this to multiple products. I attempted modifying line 7 of the code snippet: if( $product->get_id() != 87 ) return $pri ...
I am in the process of creating an Android application that retrieves product data from a WordPress site. The website has the Woocommerce plugin installed. I have been able to successfully obtain the JSON data using Postman software and basic authenticat ...
In my WordPress, I have implemented a logic where each CPT shop_order has a post_meta called "luck_number". However, the issue arises when there are more than 1000 sales per post in this CPT. When I try to retrieve the post_meta with get_post_meta inside a ...
Hey there! I've been working on my woocommerce website and have added a variety of products, some single and some variable. The singles are all good to go, but I've run into an issue with the variable ones. Every time I try to add a variable prod ...
Is there a way to prevent ajax reloading for coupons on the cart page in woocommerce when adding or removing them? I'd like this to be done with a manual page refresh. Any tips on how to achieve this would be greatly appreciated. Thank you! ...
I have been experimenting with updating a custom field on the basket/cart page for each product using WooCommerce Product Add-ons. While I did manage to get a method working as a test, it's not an ideal solution and seems to be quite messy code. Strangely ...
Hello, I am currently working on manually ajaxing this process: <a href="/cbg-gummies?add-to-cart=55337&convert_to_sub_55337=0" class="testing"> Add to cart </a> The purpose of this is to add a one-time purchase option ...
I've set a header image for my woocommerce email settings, but I only want it to display in some emails and not others. Does anyone know how I can achieve this, specifically for the 'new order' notification? ...
Can the image change be disabled when selecting a variation for a variable product? I understand that I could remove the image from the variation, but in my situation, I need to keep the variation images. Any assistance would be greatly appreciated. ...
I currently have 2 distinct ajax requests: One for endless loading The other for product filtering - by size, color, orderby, and it functions correctly with pagination. However, after applying the filters, the loadmore script does not work as expecte ...
Is there a way to display the price on the add to cart button in the loop? [100$ Add to cart] instead of [Add to cart] add_to_cart.php template: echo apply_filters( 'woocommerce_loop_add_to_cart_link', sprintf( '<a href="%s" rel="nofollow" data-p ...
I came across this code snippet for implementing a "load more" button in WooCommerce. Initially, it worked perfectly fine but I encountered an issue when trying to filter the products using an Ajax plugin - the button stopped responding altogether. You ca ...
Is there a way to display the total price of the user's cart in the header only when there is at least one item in it? I've tried implementing various suggestions from online resources but nothing seems to be working. Can anyone provide guidance ...
My shop has user profiles with registered data. On the checkout page, users can modify the automatically filled information from their profile. I want to ensure that if a customer enters a different address or email during checkout, this updated informati ...
I designed a page where I transmit concealed form field values to the WooCommerce checkout section. $my_form = '<form action="/checkout" method="post">'; $m_form .= '<input type="hidden" name="company" value="<%= company %>" ...
Is there a way to showcase the quantity of added products in the cart on the single product page as a text image? Here is what I'm currently using in functions.php, but I need to include the quantity number within: add_action('woocommerce_before ...
Looking for a solution to customize the reply-to email addresses specifically for New Order and Shipped emails sent to customers. I attempted to implement a suggested fix from this resource Change "reply to" email address in all Woocommerce email ...