Change/Replace Billing Number woocommerce - woocommerce

is there a way for me to replace the billing_phone field for the format without characters?
Today he is like this: (13) 97404-3995
I would like it to be like this:
13974043995
I tried several codes but without success

Related

How Do I List Wordpress Posts with ID Less Than Some Number with WP-CLI

The following WP-CLI command works great for getting all posts in a specific category, but I need to restrict it further to just those with an ID number less than a specific number. This is because I just exported a bunch of posts below a specific ID number and now need to remove them from the original site.
wp post list --cat=34 --format=ids
What must I add to the above so that the list only includes posts with ID<16163
I thought --post__in might do the trick but this only seems to list specific posts if you list their ID numbers separated by a comma. The description from Wordpress looks like it takes a range but it seems like a specific list.

What is a valid format for params in news bing url?

I'm trying to add some filters to request for news in bing api but currently I don't get any effects of doing this ( for example filter for news from current month).
I'm trying to this with : https://api.cognitive.microsoft.com/bing/v5.0/news/search?freshness=month&?category=business , and replacing some filters here but I always getting the same result.
Currently i want to add three filters : freshness, category and language for news from current day and month.
So it is bug or I'm doing something wrong with filters ?
One problem is that you have an extra "?" in your query. You only need the first one, and then you can use "&" to delimit individual parameters:
https://api.cognitive.microsoft.com/bing/v5.0/news/search?freshness=month&category=business
You might also try adding a market to the query string, like so:
https://api.cognitive.microsoft.com/bing/v5.0/news/search?freshness=month&category=business&mkt=en-us
I'm using 7.0 and don't know what headers you're passing, so I can't test this directly, but it's possible a default market isn't being set. Since categories are market specific, then depending on how Bing handles this, it could plausibly prevent your category from being used.

Is it possible to select more than one status in the WooCommerce API orders endpoint?

I am reading orders from a WooCommerce site with the REST API (v1, OAuth), filtering for order status:
http://mypage.com/wc-api/v1/orders?status=on-hold
Works fine.
Now I would like to filter for multiple statuses. Is this possible? Like:
http://mypage.com/wc-api/v1/orders?status=on-hold,pending
This site suggests so:
You can retrieve orders with a specific status using the ?status parameter, using commas to separate multiple statuses.
(I've already tried, but I was not able to build a valid oauth_signature with the comma, probably some kind of encoding issue. So before I keep trying, I would like to know if multiple statuses are possible in the first place.)
I finally found the reason for not being able to build a correct oauth_signature: the comma has to be double-encoded (see here for details).
Answer: yes - it is possible to select multiple statuses comma-delimited just like that:
http://mypage.com/wc-api/v1/orders?status=on-hold,pending
This works in both v1 and v2.

Filter to Group URL on Visitors Flow

I have found a similar question earlier here:
Google Analytics Visitors Flow: grouping URLs?
However I'm confused because people suggest different way to write the Replace String, and either way I try it am not able to make it work.
So I have a ecommerce site with hundreds of different pages. The different parts of the website is:
http://example.com/sv/ (Root)
http://example.com/sv/category/1-name/
http://example.com/sv/product/1-name/
http://example.com/sv/designer-tool/1-name/
http://example.com/sv/checkout/
When I go to the visitors flow. I want to see the amount of people that go from example Root to Category, and from Category to Product, and from Product to Designer Tool, and from Designer Tool to Checkout. However now when I have so many different pages it becomes very difficult to follow the visitors flow, because the product pages are for example not grouped together.
So instead of above. I would like to remove the 1-name/ part in the end. And only see /sv/category/, /sv/product/, /sv/designer-tool/.
In the earlier post I understand you can use an advanced filter to do this. I have set the following settings:
Type: Search & Replace
Field: Request URI
Search String: ^/(category|product|designer-tool)(/\d*)(.*)
Replace String: /$A1$A3
I guess that my search string and my replace string is wrong. Any ideas?
EDIT: I updated my filter to the following:
Search String: ^/sv/(category|product|designer-tool)(/\d*)(.*)$
Replace String: /sv/\1/
Still testing and unsure if it's the correct way to set it up.
I was able to solve this by the Search String and the Replace String in my edit above.
So basically what I did was:
Create a secondary view/profile for your site. If you apply your filter to your one and only view/profile that means that you won't be able to see any detailed data about specific pages, because the filter removes/filter that.
Add an Advanced Filter with the following settings:
Type: Search & Replace
Field: Request URI
Search String: ^/sv/(category|product|designer-tool)(/\d*)(.*)$
Replace String: /sv/\1/
You need to wait 24h after creating your new profile/view before you can see any data in it.
So my confusion was regarding the Search and Replace String. The Search String is an regular expression for matching everything after your .tld. So for example http://www.example.com/sv/mypage/1-post/, the Search String will only search within /sv/mypage/1-post/.
The Replace String is what it should replace the whole Search String with. So in my case, I matched all URL's that had /sv/category/1-string/. I wanted only to keep the "category" part, so I replaced the whole string with /sv/category/ by inputting Replace String /sv/\1/
/sv/ means just what it says. \1 means that it should take the value of the first () of my Search String (In this case "category"). The ending / is just an ending slash.
All in all, it means that any URLs that looked like http://example.com/sv/category/1-string/ was changed to http://example.com/sv/category/. Meaning that I can now see data for all my categories as a group, instead of individual pages.

category url format in nopcommerce

I would like to know how I can make the url's for the categories static. For example http://localhost:3547/category/53-cellphones.aspx is what I have currently but yesterday it was http://localhost:3547/category/1-cellphones.aspx.
I want to know how can I make the number in the category name static, e.g. 1-cellphones.aspx to be like that all the time, I don't want to be changed tomorrow to 3-cellphones.aspx for example.
Is that possible?
Thanks
This is normally the id of the category in the database.
Can you check the Nop_Category table and check you don't have duplicate rows.

Resources