I’m using Dokan on a WooCommerce marketplace. I’ve already made the Shop URL field optional for vendor registration using filters, and vendors can now successfully register without filling that field. However, the Shop URL field still shows a red as

WPTurbo » Snippets » I’m using Dokan on a WooCommerce marketplace. I’ve already made the Shop URL field optional for vendor registration using filters, and vendors can now successfully register without filling that field. However, the Shop URL field still shows a red as
0

Created with:

Visibility: 

public

Creator: TO

Customize with WPTurbo AI
X

Add Snippet To Project

New Project
Add To Existing Project
					<?php

// Define a constant to indicate whether the environment is a development environment
define( 'IS_DEV_ENV', true ); // Set this constant in your development environment

// Check if the current environment is a development environment
if ( IS_DEV_ENV ) {
    // Enable the display of errors for debugging purposes
    ini_set( 'display_errors', '1' ); // Show errors on the frontend
    // Set the error reporting level to report all types of errors
    error_reporting( E_ALL ); // Report all errors, warnings, and notices
} else {
    // Suppress the display of errors in production or non-development environments
    ini_set( 'display_errors', '0' ); // Hide errors from the frontend
    // Disable error reporting to prevent any errors from being displayed
    error_reporting( 0 ); // Do not report any errors
}
				

These comments will help anyone reading the code understand its functionality and the intent behind the configuration settings, making it easier to maintain and modify in the future.

Register an account to save your snippets or go Pro to get more features.