I have this add_action function that creates an array in the following way.
add_action( 'mixedcart', 'checkoutincluyenevio', 1, 2 );
function checkoutincluyenevio() {
$mensaje['label'] = "Incluye Envío";
$mensaje['price'] = null;
$mensaje['style'] = "background-color:#e4f4fd;font-weight:initial;";
$mensaje['class'] = "mixedcar";
return $mensaje;
}
This code is in the functions.php file of my theme.
In a template of my theme I want to retrieve the values by doing this.
$checkoutincluyenevio = do_action( 'mixedcart' );
I obtain as a result the variable $checkoutincluyenevio as NULL
The expected result would be the variable $mensaje with all its content.
What am I doing wrong?