woocommerce offtopic – How to get rid of variations with unspecified attributes

Some of my products have these weird variations with unspecified attributes (I am using Size and Color in my store). It looks like this:

enter image description here

So, if you would purchase a 85 B, Black variation of the product (ID 111224), in reality the order would contain the variation with unspecified attributes (ID 112392), because it is higher. It is a huge problem because those unspecified variations contain wrong SKUs and additional data.

I am using WP All Import for importing and updating products, I’m suspecting the plugin (or my settings) for this mess and I will look at it. However I have thousands of products in the store and deleting them manually is out of the question. Is there a way to delete variations that has at least one unspecified variation programatically?

I’ve tried to query such product variations using this tax_query:

'tax_query' = array(
    'relation' => 'OR',
    array(
        'taxonomy'         => 'pa_size',
        'terms'            => array(''),
        'field'            => 'slug',
        'operator'         => 'IN',
    ),
    array(
        'taxonomy'         => 'pa_color',
        'terms'            => array(''),
        'field'            => 'slug',
        'operator'         => 'IN',
    ),
);

But the query doesn’t return anything. It doesn’t work when I try to pass empty string as a value inside ‘term’ array. I’ve also tried the ‘=’ operator and empty string (not an array) as a value.

By the way, I’ve checked if those empty attributes really are empty strings and yes, they are. This code:

$product = wc_get_product(112392);
$atts = $product->get_attributes();
    
foreach($atts as $att) {
    echo gettype($att) . ' : ' . $att .  '<br>';
}

outputs this:

string : 
string : 

While for correct variations (e.g. 111224) it outputs:

string : 85-b
string : black

Any idea how could I get rid of them?
Thank you very much.

package management – getting rid of protobuf 3.13.0 in Ubuntu 20.04 and set protobuf 3.6.1 as default

I initially installed protobuf 3.13.0 and then used apt remove to remove it but it is not getting removed.

I even installed protobuf 3.6.1 from source following these instructions but still 3.13.0 is in place
https://askubuntu.com/a/1072684/165324

    $ protoc --version
    libprotoc 3.13.0


    $ sudo apt-get install protobuf-compiler libprotobuf-dev
    
    $ sudo apt remove protobuf-compiler libprotobuf-dev
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package 'libprotobuf-dev' is not installed, so not removed
    Package 'protobuf-compiler' is not installed, so not removed
    The following packages were automatically installed and are no longer required:
      libprotobuf-lite17 libprotoc17 linux-image-5.4.0-58-generic linux-modules-5.4.0-58-generic
      linux-modules-extra-5.4.0-58-generic
    Use 'sudo apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
$ sudo apt-get install protobuf-compiler libprotobuf-dev

$ sudo apt remove protobuf-compiler libprotobuf-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'libprotobuf-dev' is not installed, so not removed
Package 'protobuf-compiler' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libprotobuf-lite17 libprotoc17 linux-image-5.4.0-58-generic linux-modules-5.4.0-58-generic
  linux-modules-extra-5.4.0-58-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.

installed 3.6.1 using:

$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protobuf-all-3.6.1.tar.gz

$ tar -xvzf protobuf-all-3.6.1.tar.gz 

$ cd protobuf-3.6.1/

$ ./configure

$ make

$ make check

$ sudo make install

$ sudo ldconfig

installation – How do I get rid of “encoding error” when installing WordPress?

When trying to install WordPress on the Server it says that the encoding of the file is incorrect and I cannot even select the language.
This is the error code.

The character encoding of the HTML document was not declared.
The document will render with garbled text in some browser configurations
if the document contains characters from outside the US-ASCII range.
The character encoding of the page must be declared in the document or in the transfer protocol.

I tried to install the software on Mamp and there it works.
I tried uploading it to multiple directories and created different subdomains. It does not work.

What is the problem?

notifications – Getting rid of “X Google enrollment” in Android 11? since I don’t use Assistant

Since I have a new phone with Android 11, every now and then I see a notification about “X Google enrollment” whatever that may be.
Upon searching around I see it’s nothing to worry about, it’s just part of Google Assistant.

However I don’t use Google Assistent, I have turned it off completely. Yet this “X Google enrollment” is still happening.

Is there I way to get rid of it? And I mean not just the notification (sure, I can disable that) but the thing itself. I’d rather not want any unnecessary processes to start or run at all.

WhatsApp on Android 11: getting rid of all notifications except for receiving messages?

I have recently installed WhatsApp on a new phone with Android 11. For some reason, WhatsApp keeps bothering me with tons and tons of notifications. ‘Backing up’ or ‘Checking new messages’ or ‘WhatsApp Web is active’ and whatever.

I’ve never seen this behaviour before on my previous installment (which was on Android 8 or 9) but it’s quite annoying.

I can of course disable WhatsApp notifications entirely. However I do want to receive notifications in case of actual messages. I just want to disable to other ones.

I’ve been looking in WhatsApp Settings > Notifications but I can’t seem to find any way to do so.

Is this possible, and how?

WhatsApp on Android 11: getting rid of all notifications except for receiving messages?

I have recently installed WhatsApp on a new phone with Android 11. For some reason, WhatsApp keeps bothering me with tons and tons of notifications. ‘Backing up’ or ‘Checking new messages’ or ‘WhatsApp Web is active’ and whatever.

I’ve never seen this behaviour before on my previous installment (which was on Android 8 or 9) but it’s quite annoying.

I can of course disable WhatsApp notifications entirely. However I do want to receive notifications in case of actual messages. I just want to disable to other ones.

I’ve been looking in WhatsApp Settings > Notifications but I can’t seem to find any way to do so.

Is this possible, and how?

How do I get rid of weird color patterns on photos from Lightroom?

I linked a photo to better visualize what I’m talking about but I get a weird pattern of colors or pixels in my photos. I don’t see it so much in Lightroom Classic but when I added the affected photos to a collection in CC mobile, the weird patterns appear. I also uploaded the same images to a cloud site for a client and the patterns don’t appear (as much). When I jump back into Lightroom to develop module, the patterns appear for a second and disappear. Sorry I don’t have a better description for the effect my photos are having but I have attached a photo. Hope someone can help me get rid of it on all platforms.im referring to the dark space of the photo where the patterns are seen

notifications – How do I get rid of the many sticky notices about my hotspot with tethering?

I’m using an Android 10 smartphone as a WiFi hotspot – and connecting a PC to it with a USB cable. As I plug the cable in, I get a first notification bubble:

USB debugging is on
Tap to turn off USB debugging

I don’t want to get this every time I connect!… and even if I do – at least I want to be able to swipe it away. No such luck.

Now, I turn on the hotspot. This gives me two more notifications:

Tethering or hotspot active
0 connected devices

Tethering or hotspot active
Tap to set up.

then I turn on USB tethering (which I also don’t understand why I can’t get to default to on); that yields another notification:

USB tethering is on
Tap for more options.

So, four different notifications, none of which I can swipe away.

What can I do to:

  1. Make them swipeable-away?
  2. Make it so that they don’t show up in the first place, or at least
  3. Make it so that they disappear a short while after appearing?

developer options – How can I get rid of the “Restart now to finish the update” popup?

I have a Pixel 2 XL that I MUST keep on Android 10 for various reasons. (Yes, I am aware of the implications of doing this. This is a device that I use for development tasks, I don’t go to random websites on it, I don’t install unknown apps, I never use it away from my trusted home WiFi network, etc.) However Google seems hellbent on making me upgrade. Every few days I get this popup message asking me to “restart now to finish the update.” I get this popup even though I have “automatic system updates” turned OFF in Developer Settings, and even though I have Google Play Services notifications turned OFF. Is there any way to stop this message from appearing?