Notice if args are attempted to replace

This commit is contained in:
Mike Jolley 2019-04-02 15:17:52 +01:00
parent 51b3e4f213
commit 5ed25e1734
1 changed files with 8 additions and 0 deletions

View File

@ -233,6 +233,14 @@ function wc_get_template( $template_name, $args = array(), $template_path = '',
);
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
}