Fix PHP Notice: ‘Undefined index’ on WordPress

Solution:1

Try looking if the variable isset and then check the contents of it.

if( isset($_GET[‘pricing’]) && $_GET[‘pricing’] == ‘1’ ){
//- do some magic
}
With your if-clause you check if the clause itself isset() instead of the variable.

Solution:2

Simply convert your faulty isset() check.

if (isset($_GET[‘pricing’])) {
$pricing = $_GET[‘pricing’];
}
The short hand version would look like this, if you want to assign a default value.

$pricing = (isset($_GET[‘pricing’])) ? $_GET[‘pricing’] : 0;