Overiding attibute values
-
Hello,
Accordording to the documentation about migration to 4, i want to override my checkout attribute.
I see for example that :
Removed JS hook cart.subtotal.text. Use shortcode attribute subtotal_label_text instead
with the php function :
$products_args['items_per_row'] = '3'; $products_args['add_to_cart_button_text'] = 'Ajouter au panier'; $products_args['subtotal_label_text'] = 'my total'; $Products->products( apply_filters('shopwp_products_all_args', $products_args) );
i apply some parameter to customize the rending.
i have try to add the key ‘subtotal_label_text’ but the render don’t display my overriding value for this key, but it’s ok for the key add_to_cart_button_text for example.
To debug this i have try to print the setted attribute in the class :
wpshopify/classes/render/class-attributes.php before the return in the function attr :echo $attr_name.' : '.$attrs[$attr_name].'<br>'; return $attrs[$attr_name];
in my front page i can see the print :
.... link_to : wordpress link_target : _self link_with_buy_button : true full_width : false add_to_cart_button_text : Ajouter au panier
…`
And i can see that the keys subtotal_label_text, cart_title, lineitem_remove_text… are not setted.
Do you know why ?
Is there a filter to do that ?
Is there another way to override the text for subtotal_label_text, lineitem_remove_text…thanks in advance
- The topic ‘Overiding attibute values’ is closed to new replies.