Pre-Fix Order Numbers by User Role

I currently have orders set with the pre-fix "W" for Wholesale orders to differentiate them from Retail orders. However, we have a few different wholesale roles and I would like to be able to differentiate those orders with a pre-fix as well. Is there a way to code a special pre-fix based on user role? The role in particular would be for a wholesale role labeled as employee. Since Employee falls under the Wholesale Role, it is getting the W prefix to their orders. I would like all other wholesale orders to have the W prefix, Employee orders to have an E prefix, and all retail orders to have no prefix (remain as-is).

Here is the snippet that works for wholesale orders to have the W prefix:

add_filter( 'woocommerce_order_number', 'change_woocommerce_order_number' ); function change_woocommerce_order_number( $  order_id ) {       $  prefix = 'W'; //The Prefix      $  order_type = get_post_meta( $  order_id, '_wwpp_order_type',true); //get Wholesale Order Type           if ($  order_type == 'wholesale') {         $  new_order_id = $  prefix . $  order_id;         return $  new_order_id;     }           return $  order_id; } 

GA: New user vs returning user

[![enter image description here][1]][1] The above is a screenshot from my GA account, behavior -> New vs Returning

What I don’t understand is why 114,875 appears to be the number of new visitors as well as the number of total users( or at least it seems to be). Sometimes it is 85.49% and sometimes it is 100%. It is totally confusing at the first glance. Why would google do this? [1]: https://i.stack.imgur.com/3uyvA.png

Spam from specific user agent

I’ve been getting thousands of requests each day from a specific user agent, Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0. They’re all from different ip addresses (the ones I’ve looked up have been Google LLC and Cloudflare), and they all use that exact same user agent. nginx logs So far I’ve seen 90 unique ip addresses

ip count

I’ve started giving 403 statuses back to them, since it seems like something is wrong here, but I can’t trace them back to any one specific point. They all seem to be legitimate requests, but they’re just so suspicious with the amount of servers they’re coming from. Am I missing something here?

‘user’ is not valid at this position, expecting an identifier

CREATE TABLE ‘users’ ( ‘id’ int(11) unsigned NOT NULL AUTO_INCREMENT, ‘name’ varchar(75) NOT NULL, ‘password’ varchar(100) NOT NULL, ’email’ varchar(100) NOT NULL, PRIMARY KEY (‘id’), UNIQUE KEY ’email’ (’email’) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;

D

How do I delete a user from the master database when the user has been deleted from the Server Logins using the SSMS Object Explorer

I am using an Azure SQL Database. I deleted some users from a Azure SQL database after I saw them mentioned in a Vulnerability Assessment report. Here’s how I deleted them:

  1. Log in to SSMS
  2. Expand the Object Explorer tree
  3. Expand the ‘Security’ folder
  4. Expand the ‘Logins’ folder
  5. Highlight the user
  6. Right-click and select ‘Delete’

I went back to the Vulnerability Assessment blade and ran a new ‘Scan’ but the users I deleted still show up in the list. The list included SQL code to show that my users still exist. I ran that code back in SSMS in the master database and confirmed my users still exist. Here’s the relevant code:

SELECT * FROM sys.database_principals

When I run the following code, I get an error saying the user does not exist (‘or you do not have permission’ – but I am a server admin so I ruled that out):

DROP LOGIN <username>

How do I get rid of these logins?

#1044 – Access denied for user ‘cpses001’@’localhost’ to database ‘test_db’

I have purchase i hosting with cpanel in godaddy and I am migrating a WordPress site, but the problem when I am trying to import database it gave me this error #1044 - Access denied for user 'cpses001'@'localhost' to database 'test_db'

I am accessing phpMyAdmin from cPanel but before that I have created the database test_db created user associated with it so when I navigate to phpMyAdmin it show me that i am logged in with the user cpses001'@'localhost which the same user used for cPanel login and it doesn’t show the user that I have created. "the user I have created have full privileges".

There is no way to logout and login to phpMyAdmin from the interface, so I tried to download the last version of phpMyAdmin and uploaded to site root directory then o navigate to it and logged in with the user that have full privileges and when I started to import the database it throw the same error.

I have contacted Godaddy support but they told me this out of their scope. so now I am stuck and i have no idea what to do as I tried all the ways. Hope someone here can save hours of pain. thanks in advance.

Shortcode to update user meta

I want to create a button on the front end and when user click, the value "user-meta" change ‘validate’

function func_change_validate() {     if (is_user_logged_in()) {         $  current_user = wp_get_current_user();           $  new_value = 'validate';         $  updated = update_user_meta( $  user_id, 'User_meta_change', $  new_value );                     return 'here i want create bootom to updated ?? <button type="submit">Validate</button>';     } }  add_shortcode('change_validate','func_change_validate');