How To Change The Add To Cart Label

How To Change The Add To Cart Label

On each line of the WooCommerce Wholesale Order Form you will see the add to cart button (in the standard layout).
Sometimes depending on the naming convention used in your site, the text 「Add To Cart」 on the button might need to be changed and you can do so using a quick filter.
Modify and add the following code to your functions.php file in your theme:
function filterAddToCartLabel($actionHtml , $product , $alternate) {
$actionHtml = str_replace('Add To Cart', 'Add To Order', $actionHtml);
return $actionHtml;
}

add_filter('wwof_filter_product_item_action_controls', 'filterAddToCartLabel', 10, 3);

You can change 「Add To Order」 to whatever you wish your button text to be.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注