To replace the default 'Qty' header of an item in Woocommerce with a customized value, you will need to add the following code to your functions.php file:
add_filter( 'woocommerce_quantity_input_args', 'custom_qty_label', 10, 2 );
function custom_qty_label( $args, $product ) {
$args['label'] = __( 'Custom Label', 'woocommerce' );
return $args;
}
Replace 'Custom Label' with your desired label. Save the changes and refresh your website to see the updated quantity label.
Asked: 2023-05-09 22:29:32 +0000
Seen: 12 times
Last updated: May 09 '23