
Add extra fields that customers fill in or choose on the product page. Each field can add a price. Selections are shown in the cart, mini-cart and checkout, and saved on the order (admin screen, emails, My Account).
Field types
Any field can be marked required. Radio cards, dropdowns and image swatches always have a choice (the first option is pre-selected).
Variation radio buttons
Variation attributes such as size or colour are shown as buttons instead of dropdowns. WooCommerce’s own dropdown stays in the page, hidden, so WooCommerce still does all the matching of variations, price, stock, image and availability. Combinations that WooCommerce disables or removes are disabled or hidden on the buttons too. You can switch this off store-wide.
Security
Prices are never taken from the browser. The page only sends which option was chosen (or the text typed). Every price is read from the product’s configuration on the server and applied to the cart item there. Values are validated against the configuration, and anything else is rejected with a message.
Per product: edit a product and use the Product add-ons box.
Label|price, for example Small|0, Large – 500 ml|20. Labels cannot contain commas or |. Use a dot for decimals.5. The old Label|5 form is also accepted.Prices are per item and are added to the product (or variation) price. Negative prices are allowed as discounts, but an item’s price never goes below 0.
Store-wide: WooCommerce Settings Products Product add-ons.
Actions:
rexivue_rpcf_loaded( Plugin $plugin ): all components are registered. Use $plugin->get( 'cart' ) and similar to reach one.Filters:
rexivue_rpcf_product_fields( array $fields, WC_Product $product ): the normalised add-on fields of a product.rexivue_rpcf_validated_selection( array $result, array $fields, WC_Product $product ): the trusted selection (items, total) before it is stored in the cart.rexivue_rpcf_max_length( int $max, array $field, WC_Product $product ): maximum characters for text (default 255) and textarea/message (default 2000) values.rexivue_rpcf_cart_item_price( float $price, float $base, float $total, WC_Product $product ): final unit price of a cart item with add-ons.rexivue_rpcf_use_variation_radios( bool $enabled, WC_Product $product, string $attribute ): show one attribute as radio buttons or not.WooCommerce hooks used: woocommerce_before_add_to_cart_button, woocommerce_add_to_cart_validation, woocommerce_add_cart_item_data, woocommerce_add_cart_item, woocommerce_pre_remove_cart_item_from_session, woocommerce_get_cart_item_from_session, woocommerce_get_item_data, woocommerce_check_cart_items, woocommerce_add_order_again_cart_item, woocommerce_order_again_cart_item_data, woocommerce_checkout_create_order_line_item, woocommerce_order_item_display_meta_key, woocommerce_dropdown_variation_attribute_options_html, woocommerce_admin_process_product_object, woocommerce_product_add_to_cart_url, woocommerce_product_add_to_cart_text, woocommerce_product_supports, woocommerce_get_sections_products, woocommerce_get_settings_products.
AJAX actions, REST routes, shortcodes: none. The plugin adds no endpoints of its own. (2.1 shipped a script that called an sp_update_price AJAX action that never existed; it has been removed.)
_rexivue_rpcf_addons (copied from the earlier plugin’s _sp_addons, which is left in place): array( 'version' => 3, 'fields' => array( … ) ). version is the data format (1.0 writes format 3; earlier releases wrote no number).rexivue_rpcf: array( 'version' => 3 (data format), 'items' => array( … ), 'total' => float ).Large – 500 ml (+₹20.00)), Add-ons total, and hidden _rexivue_rpcf_order_addons (structured copy used by “Order again”).rexivue_rpcf_db_version, rexivue_rpcf_variation_radios, rexivue_rpcf_heading, rexivue_rpcf_delete_data_on_uninstall.From the earlier “SP Flexible Product Addons” plugin (2.1 and before). Install this plugin, activate it, then deactivate and delete the old one.
_sp_addons configuration is copied to _rexivue_rpcf_addons, and each field gets a permanent ID and text fields get an explicit price. The old _sp_addons value is not changed or deleted. Until a product has been processed, the old value is read and converted on the fly, so nothing depends on the batch finishing.wc-variant-radio-buttons.php, wc-variant-radios-fixed.php) are replaced by the built-in variation radios.Deleting the plugin always removes its settings (rexivue_rpcf_* options). Product add-on configuration (_rexivue_rpcf_addons) is removed only if “Delete every product’s add-on configuration” was ticked in the settings. Orders, order item meta, products, customers and users are never touched.
Deactivating the plugin removes nothing.