Install
Requirements
- PHP 8.2 or newer, with the
sodiumextension - WordPress 6.7 or newer
- Pretty permalinks, because the sign-in callback is a front-end route
- A Shopify store with a headless or custom app that has Customer Account API access
If a requirement is missing, activation stops with a notice. It does not cause a fatal error.
Install the plugin
A release zip includes vendor/, so it installs like any other plugin. To build from source:
composer install # development
composer test # unit tests
composer build-prod # production vendor/ for a deploy or release zip
Deploying from a Git repository
If your host syncs the plugin folder from Git, have it run composer build-prod in the plugin folder after each sync. That is the only build step. Blockstudio compiles block styles on first load, so blocks/*/_dist/ must be writable.
Then run these WP-CLI steps once per site:
wp plugin activate <plugin-folder>
wp rewrite structure '/%postname%/'
wp rewrite flush
RedeemID runs its own Blockstudio instance from its blocks/ folder. It does not use the blockstudio/path filter, because that filter replaces a theme’s Blockstudio block folder. So it works beside Blockstudio themes and in any other theme.
Next, enter your store and app values: see Configuration.
Uninstall
By default, uninstalling keeps WordPress users and their content. It removes:
- plugin options and transients
- the webhook and app event tables
- Shopify tokens stored in sessions
To also delete shadow users and every linked field, add define( 'REDEEMID_UNINSTALL_DELETE_DATA', true ); to wp-config.php before uninstalling. Their content is reassigned to the first administrator, not deleted.