Use action_args rather than $template variable which could have been overwritten
Co-Authored-By: dinhtungdu <dinhtungdu@gmail.com>
This commit is contained in:
parent
d69f014807
commit
51b3e4f213
|
@ -238,7 +238,7 @@ function wc_get_template( $template_name, $args = array(), $template_path = '',
|
|||
|
||||
do_action( 'woocommerce_before_template_part', $action_args['template_name'], $action_args['template_path'], $action_args['located'], $action_args['args'] );
|
||||
|
||||
include $template;
|
||||
include $action_args['located'];
|
||||
|
||||
do_action( 'woocommerce_after_template_part', $action_args['template_name'], $action_args['template_path'], $action_args['located'], $action_args['args'] );
|
||||
}
|
||||
|
@ -869,7 +869,7 @@ function wc_print_js() {
|
|||
* @param string $value Value of the cookie.
|
||||
* @param integer $expire Expiry of the cookie.
|
||||
* @param bool $secure Whether the cookie should be served only over https.
|
||||
* @param bool $httponly Whether the cookie is only accessible over HTTP, not scripting languages like JavaScript. @since 3.6.0
|
||||
* @param bool $httponly Whether the cookie is only accessible over HTTP, not scripting languages like JavaScript. @since 3.6.0.
|
||||
*/
|
||||
function wc_setcookie( $name, $value, $expire = 0, $secure = false, $httponly = false ) {
|
||||
if ( ! headers_sent() ) {
|
||||
|
|
Loading…
Reference in New Issue