Rexivue Lens Prescription adds a prescription table to WooCommerce product pages, built for contact lenses and similar optical products.
Rexivue is an independent plugin. It is not affiliated with, or endorsed by, WooCommerce or Automattic.
For each product you choose:
On the product page the customer picks values and the number of boxes for each eye. The cart quantity becomes the total number of boxes (left + right), and WooCommerce charges its normal product (or variation) price for each box. The prescription is shown in the cart, mini-cart, checkout and order, and is saved on the order line item.
The plugin never sets or reads a price from the browser. The line quantity is set on the server from the validated number of boxes, and WooCommerce multiplies its own product price by that quantity, so taxes, coupons and currency plugins behave as normal.
edit_product capability.wp-content/uploads/rexivue-prescriptions/, and can only be downloaded by users with the edit_shop_orders capability through a nonce-protected link on the order screen.Product > Product data > Prescription
|, in display order. Example: -0.50|-0.75|-1.00|0.00|+0.50. A field that is ticked but has no options is not shown.WooCommerce > Settings > Products > Prescription fields
rexivue_product_config( array $config, WC_Product $product ): the normalised configuration of a product.rexivue_max_boxes( int $max = 10, WC_Product $product ): maximum boxes per eye.rexivue_is_field_required( bool $required = false, string $field, string $eye, array $clean, array $config, WC_Product|null $product ): make SPH/CYL/AXIS mandatory.rexivue_validation_errors( WP_Error $errors, array $prescription, array $config, WC_Product|null $product ): add store-specific validation rules.rexivue_upload_mimes( array $mimes ): accepted upload types (images and PDF by default).rexivue_pending_upload_lifetime( int $seconds = 604800 ): how long an upload that never reached an order is kept.rexivue_add_to_cart_selectors( string[] $selectors ): add-to-cart buttons the script handles.rexivue_buy_now_selectors( string[] $selectors ): separate Buy Now buttons.rexivue_native_submit( bool $native = true ): submit the product form natively (bypasses theme AJAX add-to-cart).rexivue_loaded( Rexivue\LensPrescription\Plugin $plugin ): after the plugin has registered its hooks. Components are available through $plugin->get( 'cart' ), get( 'order' ), get( 'frontend' ), get( 'uploads' ) and get( 'admin' ).rexivue_cleanup_pending_uploads: daily cron event that removes abandoned uploads.None.
Everything the plugin stores uses the rexivue prefix.
Product meta:
_rexivue_left_eye, _rexivue_right_eye: yes when the eye is enabled._rexivue_sph_enabled, _rexivue_cyl_enabled, _rexivue_axis_enabled: yes when the field is enabled._rexivue_sph_values, _rexivue_cyl_values, _rexivue_axis_values: allowed options separated by |._rexivue_upload_enabled: yes when uploads are enabled.Order line item meta:
rexivue_left_sph, rexivue_left_cyl, rexivue_left_axis, rexivue_left_boxes, the same four for right, and rexivue_prescription_file (original file name)._rexivue_prescription (structured copy), _rexivue_prescription_file (stored file name), _rexivue_prescription_file_name (original file name).Options: rexivue_db_version, rexivue_max_upload_mb, rexivue_delete_data_on_uninstall.
Cart item data: rexivue_prescription (array with prescription, file and uid).
Files: wp-content/uploads/rexivue-prescriptions/pending/ (in carts) and /orders/ (attached to orders).
Deactivating the plugin never deletes data.
When the plugin is deleted it always removes its scheduled event and data-version option. If Delete data on uninstall is enabled it also removes its settings, the prescription meta on products and variations, and uploads that never became part of an order.
Orders, order item meta and prescription files attached to orders are never deleted, because they are business records. Remove them manually if your data-retention policy requires it.