Linux 软件免费装

Flx Modernize

开发者 rickey29
更新时间 2026年9月24日 19:49
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce price storefront sale badge product page

下载

0.0.2

详情介绍:

Flx Modernize adds a sale savings badge (for example, "Save 25%") next to the price on any simple WooCommerce product that's currently on sale. It's computed locally, on your own site, from that product's own regular and sale price -- there's no external service to configure, no account to create, and nothing to set up beyond activating the plugin. Available now Optional Separately, Flx Modernize can optionally attempt to render a small, curated set of supported product pages through an external service called Flx Render, which you would configure and operate yourself. This integration: Not yet supported Flx Modernize does not yet modernize the Shop archive, Cart, Checkout, or My Account pages, does not support variable products, and does not replace your active theme. These are part of the broader Flx Modernize roadmap and are out of scope for this release. Settings page Settings > Flx Modernize shows the plugin version, whether the sale savings badge is active, whether the optional Flx Render integration is enabled, and whether a Flx Render endpoint is configured. Each feature has its own enable/disable checkbox -- no code editing required. Default behavior The sale savings badge ships enabled by default: after you activate Flx Modernize, any simple product you already have on sale will show the badge immediately. This is safe to enable by default because the badge is strictly additive (it never alters price, cart, checkout, or order data) and only ever appears on the product's own page, next to the price WooCommerce already displays. The optional Flx Render integration remains disabled by default, since it requires you to configure and operate a separate external service. Configuration precedence Both features also support wp-config.php constants for environments that need to force a setting regardless of the stored option: If a constant is defined, it always wins over the Settings page checkbox. If not defined, the Settings page checkbox controls behavior.

安装:

  1. Upload the flx-modernize folder to /wp-content/plugins/, or install it through the WordPress plugin screen.
  2. Activate the plugin. Any simple product already on sale will now show a sale savings badge on its product page.
  3. Optionally, visit Settings > Flx Modernize to turn the badge off, or to enable and configure the optional Flx Render integration.
  4. Optionally, for the Flx Render integration only, define in wp-config.php:
define( 'FLX_MODERNIZE_RENDER_URL', 'https://your-render-endpoint.example.com' ); define( 'FLX_MODERNIZE_EXPERIMENT_PRODUCT_IDS', array( 12, 34 ) ); // your own product IDs define( 'FLX_MODERNIZE_EXPERIMENT_ENABLED', true ); // overrides the Settings page checkbox None of this is required for the sale savings badge, which works without any configuration.

升级注意事项:

0.0.2 Adds a locally-functional sale savings badge, active by default after activation. No action required to upgrade.

常见问题:

Does this do anything after I just install and activate it?

Yes. Once activated, any simple product you have on sale immediately shows a sale savings badge on its product page -- no configuration needed. The optional Flx Render integration remains off until you choose to enable and configure it.

Will this change my prices, cart, or checkout?

No. The sale savings badge is presentation-only: it reads a product's existing regular and sale price to compute a percentage, and appends a small badge next to the price WooCommerce already shows. It never writes to product, cart, checkout, or order data.

What if a product isn't supported?

The badge only appears for simple products that are genuinely on sale with a lower sale price than regular price. Variable, grouped, and external products, and any product with missing or ambiguous price data, are left completely alone -- no badge, no error, no change to what WooCommerce would otherwise render.

What is Flx Render?

Flx Render is a separate, externally hosted rendering service that this plugin can optionally call for a small, curated set of products, entirely independent of the sale savings badge. It is not included with this plugin, and no publicly available compatible endpoint currently exists. Without it configured, or if a request fails, Flx Modernize always falls back to WordPress/WooCommerce's own native rendering.

Is this plugin finished?

This is an experimental release: the sale savings badge is a small, complete, standalone feature, but the broader Flx Modernize roadmap (Shop, Cart, Checkout, My Account, variable-product support, and more) is still in progress. See the plugin's GitHub repository for current scope and status.

更新日志:

0.0.2 0.0.1