Debugging

How to enable Debugging ↑ Back to top

Add the following lines in wp-config.php to have general PHP and WordPress warnings, error messages and status information from the WooCommerce Product Search extension logged to the site’s debug.log file. The latter is usually located in the wp-content folder.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WPS_DEBUG', true );

To log main query times, enable the option as described in the General settings.

Debugging Scripts and Styles ↑ Back to top

If you would like the extension to use non-minified scripts and styles, also add:

define( 'WPS_DEBUG_SCRIPTS', true );
define( 'WPS_DEBUG_STYLES', true );

Disabling Back End and JSON Searches ↑ Back to top

The General settings provide options to power back end and JSON product searches. The settings can be overridden by setting the following constant:

define( 'WPS_EXT_PDS', false );

While the constant is set to false, the extension will not power back end or JSON product searches and the corresponding options are disabled.

Disabling REST API Searches ↑ Back to top

The General settings provide the option to power REST API product searches. The option can be overridden by setting the following constant:

define( 'WPS_EXT_REST', false );

While the constant is set to false, the extension will not power product searches via the REST API and the corresponding options are disabled.

DOM Parsing ↑ Back to top

Use the WPS_DEBUG_DOM constant to expose additional information during DOM parsing.

define( 'WPS_DEBUG_DOM', true );

This applies when accurate optimization is used to handle the requests of the search engine’s filters (when enabled in the General settings).

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top