## WordPress: How to write to a text file and save it in a folder for later download?

Question
I've a template file in the 'templates' folder that performs a function based on the JSON input it receives from an external source. I want to write that JSON input in a text file and save it somewhere. And then later ...
0
14 hours 0 Answers 1 views

## How to remove duplicates from product column (Custom field) in woocommerce

Question
I have two fields one is name/title of the product and second one is a custom field stock number (stock_number) all the products have name/title and stock number I am only showing stock number in the front end and there ...
0
14 hours 0 Answers 2 views

## PHP XMLRPC for WordPress: Adding meta tags and description

Question
I have been trying to add WordPress posts by XMLRPC calls. The code is working but the tags and categories are not setting. I have tried almost every solution provided in every forum. PS: I am getting a few of ...
0
2 days 0 Answers 23 views

## WP_Query | Help me create a search term with an ‘OR’ relation?

Question
I have written a very elaborate script that will essentially allow the user to select from categories, tags and of course the search term. Then run these parameters through a WP_Query. I can successfully achieve the results I want using the ...
0
2 days 0 Answers 2 views

## WP add_action factory

Question
Hello I am new to WP and PHP, I am trying to create a class that takes (maybe) an array of arrays, then used to generate N° add_action for each array passed. Example: [ array( "name" => "my_custom_action", "cb" ...
0
2 days 0 Answers 3 views

## WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank Question I have created a rather complex WP_Query, I need to restrict the arguments that are used within the query dependant on the users inputs. I appreciate I can wrap the whole argument in an IF statement, however if I try add ... 0 3 days 0 Answers 5 views ## How can I create a WooCommerce order with an existing shipping method? [closed] Question I'd like to create an order programmatically (for an API) and also set shipping method. I have tried with this code:$item = new WC_Order_Item_Shipping(); \$item->set_method_title( "Flat ...
0
3 days 0 Answers 4 views

## Dividing the loop to style post differently

Question
I'm using a plugin that displays post and shows them in a certain area on my site, such as the sidebar or anywhere i put the <?php;?> code, but only if the author that is writing the post clicks the ...
0
4 days 0 Answers 24 views

## WooCommerce REST API AJAX Auth – 401 response

Question
I need to implement vuejs to load the categories of my store. I've read that the woocoomerce rest api need authenticate requets to work, so I'm trying to get the categories using oauth on localhost with https enabled: // This is ...
0
4 days 0 Answers 6 views

## WordPress REST API not returning the public data

Question
I’m making a mobile application for wooCommerce store, and for that I want that people should be able to view my products, without logging in, like they do in my web. But when I make a request to get a ...
0
4 days 0 Answers 5 views