plugin updates

This commit is contained in:
Tony Volpe
2024-02-21 16:19:46 +00:00
parent c72f206574
commit 21d4c85c00
1214 changed files with 102269 additions and 179257 deletions

View File

@@ -11,6 +11,8 @@
*/
use Automattic\Jetpack\Constants;
use Automattic\WooCommerce\Internal\Admin\Logging\Settings;
use Automattic\WooCommerce\Utilities\LoggingUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -1123,3 +1125,57 @@ function get_woocommerce_term_meta( $term_id, $key, $single = true ) {
wc_deprecated_function( 'get_woocommerce_term_meta', '3.6', 'get_term_meta' );
return function_exists( 'get_term_meta' ) ? get_term_meta( $term_id, $key, $single ) : get_metadata( 'woocommerce_term', $term_id, $key, $single );
}
/**
* Registers the default log handler.
*
* @deprecated 8.6.0
* @since 3.0
* @param array $handlers Handlers.
* @return array
*/
function wc_register_default_log_handler( $handlers = array() ) {
wc_deprecated_function( 'wc_register_default_log_handler', '8.6.0' );
$default_handler = wc_get_container()->get( Settings::class )->get_default_handler();
array_push( $handlers, new $default_handler() );
return $handlers;
}
/**
* Get a log file path.
*
* @deprecated 8.6.0
* @since 2.2
*
* @param string $handle name.
* @return string the log file path.
*/
function wc_get_log_file_path( $handle ) {
wc_deprecated_function( 'wc_get_log_file_path', '8.6.0' );
$directory = trailingslashit( realpath( Constants::get_constant( 'WC_LOG_DIR' ) ) );
$file_id = LoggingUtil::generate_log_file_id( $handle, null, time() );
$hash = LoggingUtil::generate_log_file_hash( $file_id );
return "{$directory}{$file_id}-{$hash}.log";
}
/**
* Get a log file name.
*
* @since 3.3
*
* @param string $handle Name.
* @return string The log file name.
*/
function wc_get_log_file_name( $handle ) {
wc_deprecated_function( 'wc_get_log_file_name', '8.6.0' );
$file_id = LoggingUtil::generate_log_file_id( $handle, null, time() );
$hash = LoggingUtil::generate_log_file_hash( $file_id );
return "{$file_id}-{$hash}";
}