how to load random related posts with specific custom fields?

I want to load 3 posts that have the same custom field value as the current post.
for example:
The current post has 3 custom fields:
color: black
background: red
lastname: doe
Now I want to load three posts with these custom fields:
first post: color:black
second post: background:red
third post: lastname:doe
these are my codes:

why woocommerce api only do not upload images from local computer?

I want to upload images on my computer to a wordpress website, however the woocommerce api is only working well with everything except images on my computer. Here is the code I am using when it works just fine, creates the product and uploads the image: require __DIR__ . ‘/vendor/autoload.php’; use AutomatticWooCommerceClient; $woocommerce = new … Read more