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.
- Install Buyblock next to the old plugin. Keep
paypalPlugin()for now:
Redeploy. The sidebar now shows Buyblock twice: the new one opensimport { paypalPlugin } from "@zachristudio/buyblock-paypal"; import { buyblock, buyblockPlugin } from "@zachristudio/buyblock"; // in emdash({ … }) plugins: [paypalPlugin(), buyblockPlugin()], // and add buyblock() to integrations, as in Install/_emdash/admin/plugins/buyblock, the old one/_emdash/admin/plugins/paypal. - 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.
- Recreate your products with the same name, price, currency and button style. Optionally add a Digital file.
- 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.
- 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.
- Remove the old plugin. Delete
paypalPlugin()and its import, runnpm 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.