=== AffiliateBoxes.com Integration === Contributors: affiliateboxes, lapzor Donate link: https://affiliateboxes.com/ Tags: affiliate, affiliate-marketing, affiliate-link, product-box, shortcode Requires at least: 5.9 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 1.1.2 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html Display AffiliateBoxes.com affiliate boxes with a block or shortcode. Each affiliate box and comparison table is synced automatically and stored in your WordPress site. == Description == AffiliateBoxes.com Integration lets you insert rich affiliate boxes created in your AffiliateBoxes.com account into WordPress posts, pages, and custom post types. Every affiliate box combines a product image, description, affiliate link, and a call-to-action affiliate button, so readers can click through without leaving your content. Changes to the products are automatically synced to your WordPress site. Features: - Auto-sync: affiliate boxes synchronize automatically after changes on AffiliateBoxes.com. - Gutenberg block: pick a product from your synced list with instant preview of the affiliate box. - Shortcode: `[affiliateboxes_product slug="your-product-slug"]` to drop an affiliate box anywhere in a post or page. - Comparison tables: display multiple affiliate links and buttons side by side with the table shortcode. - Manual refresh: force a sync from the plugin settings screen. Use it to build product roundups, "best of" lists, and review posts with a consistent affiliate box design, a clear affiliate button, and a trackable affiliate link for every product. You'll need an AffiliateBoxes.com account (free plan available) to connect your site. == External Service == This plugin connects to AffiliateBoxes.com to synchronize and display the products created in your AffiliateBoxes.com account. The service is operated by the makers of this plugin. It makes remote requests to AffiliateBoxes.com endpoints over HTTPS for: - Site connection and verification - Listing and synchronizing your products - Retrieving product display content: the markup and stylesheet for a box or table When requests happen: - When you connect your site from the plugin settings page - When you manually synchronize products - When AffiliateBoxes.com pushes product updates to your site - During rendering if stored product content is missing or a refresh is explicitly requested Data that may be sent includes: - Site URL/domain - Product identifiers/slugs - Request authentication/signature data - Plugin/version context needed for compatibility Why this service is required: - AffiliateBoxes.com generates and manages the box and table content based on your account and product settings. This plugin is the integration layer that syncs that content and displays it. Service terms and policies: - Terms of Service: https://affiliateboxes.com/terms/ - Privacy Policy: https://affiliateboxes.com/privacy/ == Third-Party Libraries == This plugin bundles the following libraries. All are GPL-compatible, and both minified and unminified builds are included where the upstream project provides them. - Action Scheduler 3.x — GPLv3 — https://github.com/woocommerce/action-scheduler - Bootstrap 5.3 — MIT — https://github.com/twbs/bootstrap - Bootstrap Icons 1.13 — MIT — https://github.com/twbs/icons - Choices.js 11.1 — MIT — https://github.com/Choices-js/Choices - Inter (webfont) — SIL Open Font License 1.1 — https://github.com/rsms/inter Bootstrap, Bootstrap Icons, Choices.js, and Inter are loaded on this plugin's own admin screens only. The admin stylesheet is compiled from the SCSS sources in `admin/scss/` of the plugin's repository. == Installation == 1. Upload the plugin files to the `/wp-content/plugins/` directory or install via Plugins → Add New. 2. Activate the plugin through the 'Plugins' screen in WordPress. 3. Go to Affiliate Products in your WP Admin menu and click Connect to link your site with AffiliateBoxes.com. 4. Use the "Affiliate Product" block in the editor, or add the shortcode where needed. == Frequently Asked Questions == = Do I need an AffiliateBoxes.com account? = Yes. Create products on AffiliateBoxes.com, then connect your WordPress site from the plugin settings. = How do I insert an affiliate box with a shortcode? = Use: `[affiliateboxes_product slug="your-product-slug"]` Shortcodes are shown underneath the product when editing on AffiliateBoxes.com and listed on WP Admin under the Affiliate Products menu once the site is connected. = Can I customize the affiliate link or affiliate button text? = Yes. The affiliate link, button label, and button style are configured for each product in your AffiliateBoxes.com account. Once you save changes there, the affiliate box on your WordPress site updates automatically. = Can I refresh products manually if things are out of sync? = Yes. Use the "Force Synchronize" button on the settings screen to refresh immediately. There is also a refresh button on the Gutenberg block that will refresh that specific product. However, normally you would never need to do this, changes are sent to your WordPress site immediately when you save changes on AffiliateBoxes.com. = My boxes disappeared after updating to 1.1.0 = They come back on their own. Version 1.1.0 changed the stored format, so a product synced by an earlier version re-syncs the first time it is displayed. If a box stays empty, press "Force Synchronize" on the settings screen, and check that your site is still connected. = Connections to AffiliateBoxes.com fail with an SSL certificate error = All requests to AffiliateBoxes.com verify the TLS certificate, as they should. A small number of hosts ship an outdated or incomplete CA bundle, which can make verification fail even though the certificate is valid. If your host is affected and cannot update its CA bundle, you can opt out of verification for requests to AffiliateBoxes.com only, by adding this to your theme's functions.php or a site-specific plugin: `add_filter( 'http_request_args', function ( $args, $url ) { if ( false !== strpos( $url, 'affiliateboxes.com' ) ) { $args['sslverify'] = false; } return $args; }, 10, 2 );` This weakens the security of those requests, so treat it as a temporary workaround and ask your host to fix their CA bundle. The plugin deliberately does not expose this as a setting. == Screenshots == 1. Settings screen with synchronization controls and available products list. 2. Inserting a product via Shortcode 3. Gutenberg editor block == Changelog == = 1.1.2 = * Fixed: the AffiliateBoxes block missing from the block inserter on sites where another plugin declares a global `registerBlockType` variable (console error "redeclaration of non-configurable global property registerBlockType"). The block editor script no longer declares any global variables. = 1.1.1 = * Breaking: the `[affprod]` and `[afftable]` shortcodes have been replaced by `[affiliateboxes_product]` and `[affiliateboxes_table]`. Update any posts, pages, or templates that use the old tags — they are no longer registered. The `[affiliateboxes]` shortcode is unaffected. * Product stylesheets are now loaded through `wp_register_style()`/`wp_add_inline_style()` instead of being printed as a raw `