Frameworks
WordPress — Scell.io integration
WP plugin via PHP SDK + WordPress hooks
The `scell/sdk` PHP SDK v3.5.0 integrates into a WordPress plugin via `composer install` in the plugin folder. Hooks to use: `save_post` to generate an invoice on product publish, `user_register` for tenant signup. Store API key in `wp_options` (encrypted) — never in code. Requires PHP 8.2+ (WordPress 6.4+).
Key facts
- `composer require scell/sdk` in plugin folder
- Store API key in `wp_options` (encrypted)
- Hooks `save_post`, `user_register`, `wp_ajax_*`
- Compatible WordPress 6.4+, PHP 8.2+
- Admin page via `add_options_page()`
Code example
require_once __DIR__ . '/vendor/autoload.php';
use Scell\Sdk\Client;
add_action('save_post_product', function ($post_id) {
$client = new Client(get_option('scell_api_key'));
$price = (float) get_post_meta($post_id, '_price', true);
$invoice = $client->invoices()->builder()
->facturX()
->addLine(get_the_title($post_id), 1, $price, 20.0)
->create();
update_post_meta($post_id, '_scell_invoice_id', $invoice->id);
});