Skip to content

How to Add the WhatsApp Button with a Block or Shortcode

The Display tab covers product, cart and shop pages. For a landing page, a campaign page or a page builder layout, place the button yourself. Both the block and the shortcode are in the free version too.

Go to Products → All Products and hover the product. Its ID shows under the name, such as ID: 15.

On a product page, both options can skip the ID: they use the product the page shows.

  • Block editor: Add the Order on WhatsApp block from the WooCommerce group. Set Send to A product and type the ID in Product ID.
  • Any other editor or page builder: Add the shortcode [ddwcpvw_button id="15"], with your own ID.

The Order on WhatsApp block in the editor with Send and Product ID in its settings

The block draws the same shortcode behind the scenes, so both behave the same.

For a “send us your cart” button, set the block’s Send to The whole cart, or use [ddwcpvw_button type="cart"]. The button only appears when the visitor’s cart has something in it.

Publish and open the page logged out. A page with one of each looks like this:

A page with a product button and a cart button made with the shortcode

The buttons take their text and colours from the Display tab. They behave like the product page button: the delivery popup for guests, then WhatsApp.

The shortcode only works while the plugin can show buttons at all.

  • Pro: the license must be active, Status on the General tab must be on, and a WhatsApp Sender Number must be saved. Without all three, the shortcode and the block output nothing.
  • Free: Status must be on and Your WhatsApp Number filled in.

An excluded product, or one out of stock with Out of Stock Products ticked, gets no button either.