Zachri Studio Buyblock docs
Moving from buyblock-paypal
  1. Overview
  2. Install
  3. Set up PayPal
  4. Digital downloads
  5. Settings
  6. Moving from buyblock-paypal
  7. Security
  8. Privacy
  9. Changelog
  10. Support and licence

Moving from buyblock-paypal

Buyblock replaces @zachristudio/buyblock-paypal, which is no longer developed. It’s a new plugin, so keys, products, buttons and orders start fresh. Both run side by side, so you can switch page by page and keep selling the whole time.

  1. Install Buyblock next to the old plugin. Keep paypalPlugin() for now:
    import { paypalPlugin } from "@zachristudio/buyblock-paypal";
    import { buyblock, buyblockPlugin } from "@zachristudio/buyblock";
    
    // in emdash({ … })
    plugins: [paypalPlugin(), buyblockPlugin()],
    // and add buyblock() to integrations, as in Install
    Redeploy. The sidebar now shows Buyblock twice: the new one opens /_emdash/admin/plugins/buyblock, the old one /_emdash/admin/plugins/paypal.
  2. Add your PayPal keys again in the new Buyblock: Sandbox first, then Go live with your Live keys. You can keep using the same PayPal app.
  3. Recreate your products with the same name, price, currency and button style. Optionally add a Digital file.
  4. Swap the buttons. On every page with a PayPal button block, put a Buy button block in the same spot, pick the product and publish. The old plugin’s Products tab shows which pages use each product. Don’t leave an old and a new button on the same page: both load PayPal’s script and one of them may not work.
  5. Keep what you need from the old Orders tab. Past orders aren’t moved. They stay in your PayPal account (Activity) and in your database, untouched: reinstalling the old plugin shows them again.
  6. Remove the old plugin. Delete paypalPlugin() and its import, run npm uninstall @zachristudio/buyblock-paypal, and redeploy. A PayPal button block you missed then simply stops showing, with no error on the page, so check your pages first.