Hide some products form google on woocommerce

The code below hide from google a product that have a value “b2b” on a custom field.Note #1: I used a ACF function to call the custom field, but you can use get_post_metaNote#2: Required Yoast seo Will return <meta name=”robots” content=”noindex, nofollow” /> if true.If false <meta name=”robots” content=”index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1″ /> This … Read more

Duplicate the customer user roles in woocommerce via code

In particular cases, it can be useful to add a user roles group cloned.As you know the default groups in Worpress are Administrator, Editor, Author, Contributor, Subscriber.Woocommerce adds the following: Shop manager and Customer.The following code lets you create a new User Roles group base on cloning the customer roles: Questions? Suggestions? Please leave a … Read more

Remove, not hide, options from variables dropdown menu in wooCommerece’s product pages

Yesterday I had to find a way to show or remove specific options from the product variables dropdown menu.My first thought was hiding using javascript or CSS, but in the end, some browsers (like the iPhone’s safari) keep show those.If you looking at how to hide there are some interesting articles like this oneAnyway, the … Read more

Add custom fields to variation in wooCommerce admin panel

Tested on php 7.4 wp 5.5.1 wooCommerce 4.5.2 The following code add a select box on each product variation It can be called on the product page by:var_dump(get_post_meta( $available_variations[$key][‘variation_id’], ‘licence_ppl’, true )); Note that in this case i’m in a foreach [foreach ($available_variations as $key => $value) ] You can add the following type of … Read more

Text to Speech crash on unity 5

I’m working on a stable and updated text to speech for unity 5 click here for description examples and code If you are trying the “DaG_II first attempt (here)” to make unity talk on windows, using MSDN SAPI, your build version may crash Joffle from the forum unity3d figure out how to solve it: when GetVoices is called, the CustomMarshalers.dll … Read more

Text to speech for unity 5

Text to Speech on unity Make your own game talk using windows SAPI voices About SAPI The Speech Application Programming Interface or SAPI is an API developed by Microsoft to allow the use of speech recognition and speech synthesis within Windows applications. To date, a number of versions of the API have been released, which … Read more

Batch administrator privileges

Most of the time CMD command request Administrator privileges to run. Lets make a batch auto check if have admin privileges @echo off goto check_Permissions :check_Permissions echo. echo ADMINISTRATOR LEVEL REQUESTED. CHECKING PERMISSIONS … echo. net session >nul 2>&1 if %errorLevel% == 0 ( echo Success: ADMINISTRATION LEVEL PERMISSION CONFIRMED echo. cls ) else ( echo … Read more

Windows 10 missing network protocols Fixed

After upgrading to Windows 10 I lost my connectivity, Lan and wireless. The error : one or more network protocols are missing from this computer I found this command FIX the problem: Open CMD (administrator rights) Type :  netsh winsock reset catalog Reboot If still limited connection, try to uninstall Avast antivirus. Should be work now, if … Read more

Turn off camera dark screen on Unity 5 (c#)

This is a method I used to turn off camera in Blind Setting Camera.main.cullingMask to Zero using UnityEngine; using System.Collections; /******************************************** UNITY 5.2.3 Blind Project ’15 Turn ON / Turn OFF Camera & Lights v 1.0 www.Finalmarco.com /********************************************/ public class SpegniLuci : MonoBehaviour { // Use this for initialization void Start () { //Turn Off … Read more

Scene pause Unity 5 (c#)

Pausing a scene using UnityEngine; using System.Collections; //Finalmarco.com public class PausaGioco : MonoBehaviour { bool paused = false; void Update () { if(Input.GetKeyDown(“p”)) { gamePaused(); } } void OnGUI() { if (paused == true) { GUILayout.Label(“GAME IS PAUSED”); if(GUILayout.Button (“CLICK TO UNPAUSE”)) { gamePaused(); } } } void gamePaused() { if (Time.timeScale == 1) { … Read more