Skip to main content

Unanswered Questions

2,758 questions with no upvoted or accepted answers
2 votes
0 answers
905 views

WooCommerce event works in jQuery but not in JavaScript

I'm using WooCommerce hook added_to_cart which works perfectly in jQuery, but doesn't work in vanilla Javascript. Both functions are running on document loaded. Here is my code reference: JavaScript ...
2 votes
1 answer
187 views

How to write correct add_rewrite_rule in WordPress for more than one taxonomy in one rule?

I have a database of locations and services, made using WordPress , each town / region / county is a custom taxonomy, I wrote some custom rules to make slug clean but they (site owners) ask to remove ...
2 votes
0 answers
84 views

Disable shortlinks like ?p=1234 to prevent scraping

I have a site with several thousand public pages that use randomly generated slugs for their pretty urls. The content is public in the sense that if someone knows the URL, they can see the content. I'...
2 votes
2 answers
543 views

Sort products without thumbnail in WooCommerce shop page

I would like to create a function that instead of hiding the products without thumbnails, would be ordered in such a way that the products with the highlighted image appear first on the shop page ...
2 votes
2 answers
54 views

Permalinks without post type

I use norebo theme I use it when I open a Portfolio the link is in this format https://www.hshnorm.com/project/fruit-flavored-powder-juice/ How can I remove the word project To be the link in this ...
2 votes
0 answers
587 views

Create or Update thousands of woocommerce products via PHP

I have client with a cash register in the store. That register has an API from which I'm retrieving over 5000 products and syncing them with online store. I wrote plugin that triggers cron job every ...
2 votes
0 answers
1k views

WooCommerce with ACF: custom fields per product variation

I'm a little stuck here. So I have variable products and I need to show the output of a custom field in a custom tab. So I created a new field in ACF, called 'test'. I've got this to work for the ...
2 votes
0 answers
752 views

How to use WP-CLI / WC-CLI to bulk import 1000s of products (variable and simple)?

I am a junior developer and I have been asked to work on a wordpress site that has previously been using All Import plugin to upload products. The problem is, this is not functioning properly, and is ...
2 votes
0 answers
30 views

Mixed unrelated taxonomy in permalink

we have a situation where we want to build permalinks using mixed (unrelated, ie not hierarchical) taxonomies in permalinks on a wordpress site. and we dont want the taxonomy name in the actual link. ...
2 votes
0 answers
187 views

WP WPQuery, not running properly in WP CLI

I'm running a simple query just to find simple WooCommerce products, here is the query which works fine in the header of the site: $args = array( 'post_type' => 'product', 'posts_per_page' =...
2 votes
0 answers
135 views

Disable Local Attributes woo commerce

Is it possible to disable addition of local attributes in woo commerce? I have global attributes for the products which i like to use a filter. But i like to disable the possibility of addition of ...
2 votes
0 answers
821 views

Add Icons to the Product Category Sidebar Widget WooCommerce

I have been searching for this since yesterday. It's weird the little info is there about this simple function, I suppose that's because the answer is too obvious. But I didn't find the way to display ...
2 votes
0 answers
253 views

How to add SVG icon above product tab title

I used the following code to create custom product tabs (woocommerce), and now I was wondering if I can add an SVG icon above the tab title. My code for a custom product tab: add_filter( '...
2 votes
0 answers
1k views

How to get all products from an order including variations via SQL query?

I have searched a lot and hope someone has an answer. I want to run a query in the Wordpress/Woocommerce database and fetch from an individual order, all details, including the variations of a ...
2 votes
1 answer
367 views

Custom permalink structure for posts in specific category

Hi I'm trying to rewrite permalink structure for posts in one specific category, the structure should be category name - author name - post title When I use the code below, there is no author name in ...

15 30 50 per page