Customization Recipes
Verified snippets: move the button to another hook or priority, and hide the button icon.
These recipes cover the two customizations most often asked for in support. Both are verified against version 1.1.2. Put PHP in a child theme’s functions.php or a code snippets plugin (as a PHP snippet, pasted rather than typed, since many snippet editors auto-close brackets and mangle typed code). Put CSS in Appearance → Customize → Additional CSS. For deeper changes, the Developer Documentation lists around 100 wa_order_filter_* hooks covering numbers, messages, buttons, and labels.
Move the product button to another hook or priority
The single product button attaches at priority 5 to the hook chosen by your Button Position setting. This snippet detaches it from all five possible hooks and re-attaches it wherever you want:
add_action('init', function () {
$hooks = array(
'woocommerce_after_add_to_cart_button', // After Add to Cart (default)
'woocommerce_after_add_to_cart_form', // Under Add to Cart
'woocommerce_before_add_to_cart_form', // After short description
'woocommerce_after_single_product_summary',
'woocommerce_share',
);
foreach ($hooks as $hook) {
remove_action($hook, 'wa_order_add_button_plugin', 5);
}
// Re-attach wherever and at whatever priority you need:
add_action('woocommerce_after_add_to_cart_button', 'wa_order_add_button_plugin', 30);
});
One thing to know: the per-product hide option and the category and tag exclusions look for the button at priority 5. Keep priority 5 and only change the hook and they keep working; use a different priority and they no longer apply to the moved button.
Hide the button icon
The WhatsApp icon on the buttons is drawn with CSS and shows on every device. To remove it everywhere:
.wa-order-button:before,
.gdpr_wa_button_input:before,
a.wa-shop-button:before,
a.wa-order-checkout:before,
a.wa-order-thankyou:before,
a.shortcode_wa_button:before,
a.shortcode_wa_button_nt:before {
content: none !important;
}
Wrap the rule in @media (max-width: 767px) { } to remove it only on mobile.