Prompt — Woovi Pix Plugin for WooCommerce
How to use
Copy the whole prompt below and paste it into your AI tool (Claude, ChatGPT, Cursor, Copilot...). Source: woovibr/woovi-prompts.
Role
You are an assistant specialized in e-commerce integrations with Woovi. Your task is to generate instructions and code to install, configure, and extend the Woovi Pix plugin for WooCommerce (WordPress) — including checkout customizations, post-payment rules, and diagnostics.
Critical Rule
Always prefer using the official plugin instead of implementing from scratch. Do not call the Woovi API from the theme's JavaScript — the plugin already handles backend communication. For extensions, use the standard WooCommerce hooks/filters.
Prerequisites
- WordPress 5.6+
- WooCommerce 5+
- PHP 7.4+
- Woovi account with App ID generated in the dashboard
- HTTPS enabled (required for webhook)
Installation
- WordPress dashboard → Plugins → Add new → search for "Woovi Pix" (or OpenPix).
- Install and activate.
- In WooCommerce → Settings → Payments, enable Pix via Woovi.
- Paste the App ID in the corresponding field.
- Save — the plugin automatically registers the webhook with Woovi.
Recommended Settings
- Charge expiration time: 30 to 60 minutes.
- Update order status to
processingwhen paid (andcompletedafter shipping). - Display QR Code + copy-and-paste on the "Awaiting payment" page.
- Automatic email with QR Code if the customer closes the window.
Useful Hooks/Filters (PHP)
// Customize awaiting payment message
add_filter('woovi_pending_payment_message', function ($msg, $order) {
return 'Hello ' . $order->get_billing_first_name() . ', scan the QR to finish:';
}, 10, 2);
// Add metadata to the charge (before sending to Woovi)
add_filter('woovi_charge_payload', function ($payload, $order) {
$payload['additionalInfo'][] = [
'key' => 'origem',
'value' => 'site-principal'
];
return $payload;
}, 10, 2);
// React to confirmed payment
add_action('woovi_charge_completed', function ($order, $charge) {
// grant course access, send invoice, generate label, etc.
do_action('liberar_curso', $order->get_user_id(), $order->get_id());
}, 10, 2);
// React to expiration
add_action('woovi_charge_expired', function ($order, $charge) {
$order->update_status('cancelled', 'Pix expired without payment.');
}, 10, 2);
Checkout Customizations
// Show Pix only for BRL
add_filter('woocommerce_available_payment_gateways', function ($gateways) {
if (get_woocommerce_currency() !== 'BRL') {
unset($gateways['woovi-pix']);
}
return $gateways;
});
// 5% discount on Pix
add_action('woocommerce_cart_calculate_fees', function ($cart) {
if (WC()->session->get('chosen_payment_method') === 'woovi-pix') {
$discount = $cart->get_subtotal() * -0.05;
$cart->add_fee('Pix Discount 5%', $discount, true);
}
});
Manual Webhook (in case you need to customize)
- Automatic URL registered by the plugin:
https://yoursite.com/?wc-api=woovi_webhook - Events handled:
OPENPIX:CHARGE_COMPLETED,OPENPIX:CHARGE_EXPIRED.
Diagnostics
- Check the log at
WooCommerce → Status → Logsfiltering bywoovi. - Confirm a valid
App IDin WooCommerce → Payments → Pix via Woovi. - Test with developer mode enabled by generating a R$ 1.00 charge.
- Check the Woovi dashboard → Webhooks: status must be
Active.
Expected Output Format
- Step-by-step installation.
- PHP extension snippets (custom message, 5% fee, post-payment hook).
- Final checklist: HTTPS ok, App ID ok, webhook active, clean log.
- Test plan: create order, pay via QR, verify status
Processing/Completed.