MyListing Payment First Add Listing Flow
The {CODICTS} MyListing Payment First Add Listing Flow plugin changes the listing creation workflow so that users must pay for their package before creating a listing, rather than the default MyListing behavior where users create a listing first and pay later. This eliminates unpaid listing drafts and ensures payment is collected upfront.
Installation & Activation
Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.
After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.
Once activated, navigate to “Payment First Add Listing Flow” in the WordPress admin sidebar to configure the plugin. At minimum, you must select your Add Listing page(s) in the settings.
Note: On activation, the plugin automatically creates a WordPress page at
/role-selection/for the optional role selection feature.
Key Features
| Feature | Description |
|---|---|
| Payment-First Flow | Intercepts package selection and redirects users to WooCommerce checkout before allowing listing creation. |
| Automatic Post-Payment Redirect | After successful checkout, users are automatically redirected back to the Add Listing page with their purchased package pre-selected. |
| Multiple Add Listing Pages | Supports multiple Add Listing pages for different listing types. |
| Free Package Bypass | Optionally skip checkout for free ($0) packages, letting users proceed directly to the listing form. |
| Guest User Support | Optionally enable the payment-first flow for non-logged-in users. |
| Account Type Selection | Optionally present a role selection page (Primary vs. Secondary) between package selection and checkout. |
| WooCommerce Subscriptions Compatible | Handles subscription-based packages correctly for post-payment redirects. |
| Existing Package Support | Only intercepts “Buy New” package selections — users choosing existing owned packages proceed normally. |
The Problem It Solves
In the default MyListing flow, a user fills out the entire listing form (title, description, images, etc.), then selects a package and is taken to checkout. If the user abandons checkout at that point, the listing is saved as a draft — creating incomplete, unpaid listings on your site.
This plugin reverses the flow: users pay first, then create their listing. No listing is created without payment.
Default MyListing Flow
1. User fills out the listing form → 2. User selects a package → 3. User goes to checkout → 4. If abandoned, an unpaid draft listing remains
Payment-First Flow (This Plugin)
1. User selects a package → 2. User pays at checkout → 3. User is redirected back to fill out the listing form → 4. No listing exists until payment is complete
How It Works
Standard Flow (Paid Packages)
1. The user visits the Add Listing page and selects a listing type.
2. Instead of filling out the listing form, the user clicks “Buy New” on a package. The plugin intercepts this action and redirects the user to WooCommerce checkout with the selected package in their cart.
3. The user completes checkout and pays for the package.
4. After successful payment, the user is automatically redirected back to the Add Listing page. Their purchased package is pre-selected and the package selection form is auto-submitted, taking the user directly to the listing creation form.
5. The user fills out and submits their listing normally.
Note: During the redirect back from checkout, the page briefly hides while the plugin auto-selects the purchased package. This is normal behavior — if something goes wrong, the page appears normally for manual selection.
Free Package Flow
When the “Skip checkout on free packages” setting is enabled, packages with a WooCommerce product price of exactly $0 bypass the checkout redirect entirely. Users selecting a free package proceed directly to the listing form without going through WooCommerce checkout.
Role Selection Flow
When the “Enable account type selection” setting is enabled and MyListing’s secondary role is configured, users see an additional step between package selection and checkout where they choose their account type (Primary or Secondary). This is useful for directory sites that distinguish between user types such as “Individual” vs. “Business.”
If only one role is available (secondary role not enabled in MyListing), the selection page is skipped automatically.
Settings
Navigate to “Payment First Add Listing Flow” in the WordPress admin sidebar to access the settings page.
| Setting | Default | Description |
|---|---|---|
| Select the add listing pages | add-listing | The page(s) where the MyListing Add Listing widget is placed. The plugin monitors these pages and intercepts package selection. Supports multiple pages — select all pages that contain the Add Listing widget. This is a required setting. |
| Enable for non-logged in users? | Off | When ON: The payment-first flow works for both logged-in and guest users. When OFF: Only logged-in users experience the payment-first flow; guests see the default MyListing behavior. Requires WooCommerce Guest Checkout and Account Creation to be enabled (see below). |
| Skip checkout on free packages | Off | When ON: Packages with a product price of exactly $0 bypass the checkout redirect. Users go directly to the listing form. When OFF: All packages, including free ones, go through the checkout flow. |
| Enable account type selection | Off | When ON: A role selection page appears between package selection and checkout. Only shown when MyListing’s secondary role is enabled. When OFF: Users go directly to checkout. |
| Default account type | Primary | The default MyListing account type assigned to new users created during checkout. Options: Primary (maps to “customer” role) and Secondary (maps to “customer_alt” role, if enabled in MyListing). |
Setting Up Guest User Support
To enable the payment-first flow for non-logged-in users:
1. Toggle “Enable for non-logged in users?” to ON in the plugin settings.
2. In WooCommerce, navigate to WooCommerce → Settings → Accounts & Privacy.
3. Enable “Allow customers to place orders without an account” (Guest Checkout).
4. Enable “Allow customers to create an account during checkout” (Account Creation).
Important: Without these WooCommerce settings enabled, guest users will not be able to complete the checkout process.
Using Multiple Add Listing Pages
If your site has different Add Listing pages for different listing types (e.g., one page for “Restaurants” and another for “Hotels”), you can select all of them in the settings. The plugin monitors all selected pages and correctly redirects users back to the page they originally came from after payment.
Use the multi-select dropdown on the settings page to choose all relevant pages.
Account Type / Role Selection
MyListing supports two user roles: Primary (customer) and Secondary (customer_alt). When the role selection feature is enabled, new users can choose their account type before registration during checkout.
How It Works
1. The user selects a package and is redirected toward checkout.
2. Before reaching checkout, the user sees the role selection page at /role-selection/ with options for Primary and Secondary account types. The labels are pulled from your MyListing role configuration.
3. The user selects their account type and continues to checkout.
4. When the user’s account is created during checkout, the selected role is assigned automatically.
Setup
1. Make sure MyListing’s secondary role is enabled in your MyListing theme settings.
2. Toggle “Enable account type selection” to ON in the plugin settings.
3. Verify the /role-selection/ page exists and is published (created automatically on plugin activation).
4. Optionally set the “Default account type” — this is used when a user’s account is created without an explicit role selection.
How Existing Packages Are Handled
The plugin only intercepts the “Buy New” package action. If a user already owns a package and selects it from their existing packages list, the form submits normally without any redirect — the user proceeds directly to the listing form using their owned package.
WooCommerce Subscriptions Compatibility
The plugin is fully compatible with WooCommerce Subscriptions for subscription-based listing packages. After payment, the plugin correctly detects subscription orders and resolves the subscription ID for the post-payment redirect.
No special configuration is needed — the plugin automatically detects whether WooCommerce Subscriptions is installed and handles subscription orders accordingly.
Session & Timeout Behavior
The plugin stores flow data temporarily to track the user’s journey from the Add Listing page through checkout and back. This data expires after 1 hour. If a user starts the flow but takes longer than 1 hour to complete checkout, the stored data expires and the automatic redirect back to the Add Listing page will not work. The user would need to start the flow again from the Add Listing page.
The flow data is cleared automatically each time a user visits an Add Listing page, so there’s no interference from previous sessions.
Frequently Asked Questions
Does the plugin require WooCommerce?
Yes. The plugin uses WooCommerce’s cart, checkout, and order systems. Without WooCommerce installed and active, the plugin cannot function.
What’s the difference between this plugin and the default MyListing flow?
By default, MyListing lets users create a listing first and pay later. This plugin reverses the flow: users must pay for their package before they can create a listing, eliminating unpaid drafts and incomplete transactions.
Does it work with free packages?
Yes. With the “Skip checkout on free packages” setting enabled, free ($0) packages bypass the checkout redirect entirely. Users go straight to the listing form. With the setting disabled, even free packages go through WooCommerce checkout.
Does it support multiple Add Listing pages?
Yes. You can select multiple pages in the settings. The plugin monitors all selected pages and redirects users back to the correct page after payment.
Does it work with WooCommerce Subscriptions?
Yes. The plugin detects subscription-based orders and handles the post-payment redirect correctly.
What happens if the user abandons checkout?
The flow data is stored for 1 hour. If the user returns and completes checkout within that time, the redirect works normally. After 1 hour, the data expires and the user needs to start the flow again from the Add Listing page.
Does the plugin modify any listing data?
No. The plugin only manages the WooCommerce cart and the checkout redirect. The actual listing creation is handled entirely by MyListing’s native flow after the user is redirected back to the Add Listing page.
Can I use it alongside the MyListing claim listing flow?
Yes. The claim listing flow works alongside the payment-first flow without conflict.
How does it handle users who already own packages?
The plugin only intercepts the “Buy New” button. If a user selects an existing owned package, the form submits normally and the user proceeds directly to the listing form — no checkout redirect occurs.
What is the role selection feature?
MyListing supports two user roles: Primary (customer) and Secondary (customer_alt). When enabled, the plugin presents a role selection page between package selection and checkout, letting new users choose their account type. This is useful for directories that distinguish between user types such as “Individual” vs. “Business.”
Do guest users need to create an account?
If you enable the payment-first flow for non-logged-in users, you must also enable Guest Checkout and Account Creation in WooCommerce settings (WooCommerce → Settings → Accounts & Privacy) so that guest users can complete the checkout process.
Troubleshooting
Plugin Not Intercepting Package Selection
| Cause | Solution |
|---|---|
| Add Listing page not selected in settings | Navigate to the plugin settings and select the correct Add Listing page(s). The slug must match exactly. |
| Multiple Add Listing pages not all selected | If you have different pages for different listing types, make sure all of them are selected in the settings. |
| JavaScript error | Open the browser console (F12 → Console) and check for errors. The plugin requires jQuery and the MyListing package selection form to be present on the page. |
| MyListing not active | Check for the red admin error notice. The plugin does nothing if MyListing is not detected. |
User Not Redirected Back After Payment
| Cause | Solution |
|---|---|
| Session expired | The flow data expires after 1 hour. If the user takes longer to complete checkout, they need to start the flow again from the Add Listing page. |
| IP or browser changed | The session is tied to the user’s IP address and browser. If either changes between the Add Listing page and checkout (e.g., VPN, switching browsers), the session won’t match. |
| WooCommerce Subscriptions issue | If using subscription-based packages, ensure WooCommerce Subscriptions is up to date. |
| Order not completed | The redirect only fires on the WooCommerce order-received (thank you) page after a successful payment. Pending or failed orders do not trigger the redirect. |
Free Packages Still Going Through Checkout
| Cause | Solution |
|---|---|
| Setting not enabled | Toggle “Skip checkout on free packages” to ON in the plugin settings. |
| Product price not exactly $0 | The WooCommerce product attached to the package must have a price of exactly $0. Sale prices or coupons that reduce the price to $0 do not qualify. |
| Product missing or deleted | Ensure the package’s WooCommerce product exists and is published. |
Role Selection Page Not Appearing
| Cause | Solution |
|---|---|
| Setting not enabled | Toggle “Enable account type selection” to ON in the plugin settings. |
| Secondary role not configured | Enable MyListing’s secondary role in your theme settings. If only one role exists, the selection page is skipped automatically. |
| Role selection page deleted | Ensure a WordPress page with the slug role-selection exists and is published. If it was deleted, deactivate and reactivate the plugin to recreate it. |
Page Briefly Flashes or Stays Hidden After Checkout
| Cause | Solution |
|---|---|
| Normal behavior | The page is briefly hidden while the plugin auto-selects the purchased package. This is expected and takes less than a second. |
| Page stays hidden | A JavaScript error may be preventing the auto-selection. Open the browser console (F12 → Console) to check for errors. If the purchased package can’t be found, the page should reveal itself as a fallback. |
Non-Logged-In Users Not Getting the Payment-First Flow
| Cause | Solution |
|---|---|
| Setting not enabled | Toggle “Enable for non-logged in users?” to ON in the plugin settings. |
| WooCommerce guest settings | Enable both “Allow customers to place orders without an account” and “Allow customers to create an account during checkout” in WooCommerce → Settings → Accounts & Privacy. |
“MyListing Theme Not Detected” Error
The MyListing theme must be installed and active. Go to Appearance → Themes to verify.
Settings Page Not Appearing
| Cause | Solution |
|---|---|
| MyListing not active | Install and activate the MyListing theme first. |
| Insufficient permissions | Only users with the manage_options capability (typically Administrators) can access the settings page. |
| Plugin not activated | Verify the plugin is active in Plugins → Installed Plugins. |
For further support, visit codicts.com or contact us at support@codicts.com.