Notice if args are attempted to replace
This commit is contained in:
parent
51b3e4f213
commit
5ed25e1734
|
@ -233,6 +233,14 @@ function wc_get_template( $template_name, $args = array(), $template_path = '',
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( ! empty( $args ) && is_array( $args ) ) {
|
if ( ! empty( $args ) && is_array( $args ) ) {
|
||||||
|
if ( isset( $args['action_args'] ) ) {
|
||||||
|
wc_doing_it_wrong(
|
||||||
|
__FUNCTION__,
|
||||||
|
__( 'action_args should not be overwritten when calling wc_get_template.', 'woocommerce' ),
|
||||||
|
'3.6.0'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
extract( $args ); // @codingStandardsIgnoreLine
|
extract( $args ); // @codingStandardsIgnoreLine
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue