skip to Main Content

How to Debug and Log to the Browser Console in PHP

Just create this simple function and use the console for debugging and logging PHP. function debug_to_console( $data ) { $output = $data; if ( is_array( $output ) ) { $output = implode( ',', $output); } echo "<script>console.log( 'Debug Objects: "…

Mehr Lesen
GDPR – Prevent WordPress Fromn Sending Unnecessary Data On Core Updates

GDPR – Prevent WordPress fromn sending unnecessary data on core updates

Stop WordPress sending anything but essential data during the update check function wp_update_privacy( $query ) { unset($query['php']); unset($query['mysql']); unset($query['local_package']); unset($query['blogs']); unset($query['users']); unset($query['multisite_enabled']); unset($query['initial_db_version']); return $query; } add_action( 'core_version_check_query_args', 'wp_update_privacy' );

Mehr Lesen

WooCommerce GDPR – Do not store IP for orders

Snippet to clear customer IP address when order is sent in WooCommerce add_action( 'woocommerce_checkout_update_order_meta', 'wc_delete_customer_ip', 1 ); function wc_delete_customer_ip( $order_id ) { update_post_meta( $order_id, '_customer_ip_address', 0 ); } Stop customer IP from being saved in orders in WooCommerce add_filter( 'update_post_metadata',…

Mehr Lesen
Back To Top