Blocks for AffiliateWP

Blocks is a new free add-on for AffiliateWP that adds (yep, you guessed it) blocks. It provides an improved experience over shortcodes when using the WordPress block editor.
Shortcodes are neat (and aren’t going anywhere) but blocks can provide a visual representation for specific elements when working with AffiliateWP. As an example, instead of seeing the Affiliate Registration shortcode, you’ll see the entire form right within the block editor. Based on AffiliateWP’s settings, it will show or hide specific fields.
In total there are ten blocks, one for each of the shortcodes AffiliateWP currently provides.
Showing an affiliate their referral URL
Have you ever used the Affiliate Referral URL shortcode to display a referral URL to the logged in affiliate?
By using the Affiliate Referral URL block, you’ll now see how the referral URL will appear to affiliates when they view the page. You’ll no longer need to remember all the different shortcode parameters like pretty, format and url.
Just insert the block and configure the block’s options from the sidebar. As you update each option, the preview will instantly update within the editor.
If the user editing the page also happens to be an affiliate, they’ll see their real affiliate ID or username.

Restricting content to affiliates (or non affiliates)
Any block added inside the Affiliate Content block will only be visible to logged in (and active) affiliates. There’s also a block for doing the opposite, only showing content to non affiliates.
When any block within the Affiliate Content block is focused, it will show a notice, reminding you who the block’s intended audience is.

Give it a spin!
We’re excited at the possibilities blocks allow and we can’t wait to hear any and all feedback from you. There’s certainly a lot more we can do to further improve the experience.
Blocks is available now for all AffiliateWP users, and can be downloaded from within your WordPress admin, via the add-on page, or from the plugin page on WordPress.org.
Enjoy!
Ooooh wow!