Merged in feature/280-dev-dev01 (pull request #21)

auto-patch  280-dev-dev01-2024-01-19T16_41_58

* auto-patch  280-dev-dev01-2024-01-19T16_41_58
This commit is contained in:
Tony Volpe
2024-01-19 16:44:43 +00:00
parent 2699b5437a
commit be83910651
2125 changed files with 179300 additions and 35639 deletions

View File

@@ -77,12 +77,13 @@ class WC_Log_Handler_DB extends WC_Log_Handler {
'%s', // possible serialized context.
);
unset( $context['source'] );
if ( ! empty( $context ) ) {
try {
$insert['context'] = serialize( $context ); // @codingStandardsIgnoreLine.
} catch ( Exception $e ) {
$insert['context'] = serialize( 'There was an error while serializing the context: ' . $e->getMessage() );
if ( isset( $context['backtrace'] ) && true === filter_var( $context['backtrace'], FILTER_VALIDATE_BOOLEAN ) ) {
$context['backtrace'] = self::get_backtrace();
}
$insert['context'] = wp_json_encode( $context, JSON_PRETTY_PRINT );
}
return false !== $wpdb->insert( "{$wpdb->prefix}woocommerce_log", $insert, $format );