Add deprecated param to deprecated functions, use wc_print_r instead of print_r, PHPCS fix
This commit is contained in:
parent
fdc89056cd
commit
0360801994
|
@ -297,6 +297,7 @@ class WC_Admin_Webhooks {
|
|||
/**
|
||||
* Logs output.
|
||||
*
|
||||
* @deprecated 3.3.0
|
||||
* @param WC_Webhook $webhook Deprecated.
|
||||
*/
|
||||
public static function logs_output( $webhook = 'deprecated' ) {
|
||||
|
@ -335,8 +336,9 @@ class WC_Admin_Webhooks {
|
|||
/**
|
||||
* Get the logs navigation.
|
||||
*
|
||||
* @param int $total Deprecated.
|
||||
* @param WC_Webhook $webhook Deprecated.
|
||||
* @deprecated 3.3.0
|
||||
* @param int $total Deprecated.
|
||||
* @param WC_Webhook $webhook Deprecated.
|
||||
*/
|
||||
public static function get_logs_navigation( $total, $webhook ) {
|
||||
wc_deprecated_function( 'WC_Admin_Webhooks::get_logs_navigation', '3.3' );
|
||||
|
|
|
@ -410,11 +410,15 @@ class WC_Webhook extends WC_Legacy_Webhook {
|
|||
'Duration' => $duration,
|
||||
'Request' => array(
|
||||
'Method' => $request['method'],
|
||||
'Headers' => array_merge( array(
|
||||
'User-Agent' => $request['user-agent'],
|
||||
), $request['headers'] ) ),
|
||||
'Body' => wp_slash( $request['body'] ),
|
||||
'Headers' => array_merge(
|
||||
array(
|
||||
'User-Agent' => $request['user-agent'],
|
||||
),
|
||||
$request['headers']
|
||||
),
|
||||
),
|
||||
'Body' => wp_slash( $request['body'] ),
|
||||
),
|
||||
);
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$message['Webhook Delivery']['Response'] = array(
|
||||
|
@ -432,7 +436,7 @@ class WC_Webhook extends WC_Legacy_Webhook {
|
|||
);
|
||||
}
|
||||
|
||||
$logger->info( print_r( $message, true ), array(
|
||||
$logger->info( wc_print_r( $message, true ), array(
|
||||
'source' => 'webhooks-delivery',
|
||||
) );
|
||||
|
||||
|
@ -450,7 +454,7 @@ class WC_Webhook extends WC_Legacy_Webhook {
|
|||
$response_body = wp_remote_retrieve_body( $response );
|
||||
}
|
||||
|
||||
$logger->info( print_r( $message, true ), array(
|
||||
$logger->info( wc_print_r( $message, true ), array(
|
||||
'source' => 'webhooks-delivery',
|
||||
) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue