Documentation
Everything you need to know about Price Builder Opus
Installation
Download the Plugin
Download the Price Builder Opus zip file from your account or the link sent to your email.
Upload to WordPress
Go to Plugins → Add New → Upload Plugin. Select the zip file and click Install Now.
Activate the Plugin
Click Activate after installation. You'll find Price Builder Opus under WooCommerce menu.
Quick Start
Get your first custom price layout running in under 5 minutes:
- Navigate to WooCommerce → Price Builder
- Choose a scenario (Simple, Sale, Variable, Variable Sale)
- Select a preset or start from scratch
- Drag and arrange elements on the canvas
- Save and activate for your desired locations
Requirements
Canvas Basics
The canvas is your visual playground for designing price displays. It's powered by Konva.js for smooth, 60fps interactions.
Key Features
- Drag & Drop - Move elements freely with smooth animations
- Snap Guides - Automatic alignment guides appear when positioning elements
- Proportional Scaling - Hold Shift while resizing to maintain aspect ratio
- Rotation - Use corner handles to rotate any element
- Real-time Preview - All changes are immediately visible on the canvas
Element Types
Price Builder Opus includes six built-in element types:
Regular Price
Display the original product price with full decimal control.
Sale Price
Show discounted price with optional strikethrough effects.
Variable Range
Display min-max price ranges for variable products.
Currency Symbol
Standalone currency indicator with custom positioning.
Discount Badge
Show percentage or amount saved with animations.
Custom Text
Add labels, prefixes, or any custom text content.
Available Filters
Price Builder Opus provides extensive filter hooks for customization:
Disable PBO for Specific Context
// Disable for a custom product loop
add_filter( 'pbo_use_layout', '__return_false' );
// Your custom product loop here
while ( $products->have_posts() ) {
// Product display code...
}
// Restore PBO
remove_filter( 'pbo_use_layout', '__return_false' );
Disable PBO for Specific Products
add_filter( 'pbo_use_layout', function( $use, $product, $location ) {
// Disable for product ID 123
if ( $product->get_id() === 123 ) {
return false;
}
// Disable for all cart locations
if ( $location === 'cart' ) {
return false;
}
return $use;
}, 10, 3 );
Add Custom Locations
add_filter( 'pbo_available_locations', function( $locations ) {
$locations['cart'] = [
'label' => __( 'Cart', 'my-plugin' ),
'description' => __( 'Cart page item prices', 'my-plugin' ),
];
$locations['checkout'] = [
'label' => __( 'Checkout', 'my-plugin' ),
'description' => __( 'Checkout page item prices', 'my-plugin' ),
];
return $locations;
} );
Custom Renderers
Register your own element renderers to extend Price Builder Opus:
import { registerRenderer } from '@/components/Canvas/elements';
// Create your custom renderer component
const MyCustomRenderer = ({ element }) => {
return (
{/* Your custom rendering logic */}
);
};
// Register it with a unique type name
registerRenderer('myCustomElement', MyCustomRenderer);
Custom renderers have access to all element properties including position, dimensions, typography, colors, and animations.
Custom Presets
Create and register your own layout presets:
import { registerPreset } from '@/registry';
registerPreset({
id: 'my-custom-preset',
name: 'My Custom Preset',
description: 'Description of my preset',
scenario: 'simple', // or 'sale', 'variable_simple', 'variable_sale'
preview: 'my-custom-preset', // matches image filename
isAdvanced: true, // places preset in Advanced section
containerSettings: {
customCss: '/* Custom CSS */',
customJs: '// Custom JavaScript'
},
elements: [
{
type: 'regularPrice',
position: { x: 100, y: 110 },
color: '#1f2937',
typography: { fontSize: 28, fontWeight: 600 },
},
],
});
Render Modes
PBO supports two rendering modes:
SSR (Server-Side Rendering)
Default mode. Prices rendered as static HTML for best performance and SEO.
- Zero layout shift
- Better SEO
- Faster initial paint
Web Component
Client-side rendering using custom elements. Ideal for dynamic scenarios.
- Encapsulated styles
- AJAX-friendly
- JavaScript animations
Switch Render Modes
// Use web component mode globally
add_filter( 'pbo_render_mode', fn() => 'web_component' );
// Use web component for variable products only
add_filter( 'pbo_render_mode', function( $mode, $product, $location ) {
if ( $product->is_type( 'variable' ) ) {
return 'web_component';
}
return $mode;
}, 10, 3 );
API Reference
Full API reference for developers:
| Filter | Parameters | Description |
|---|---|---|
pbo_use_layout |
$use, $product, $location |
Control whether PBO renders for specific context |
pbo_render_mode |
$mode, $product, $location |
Switch between SSR and web component modes |
pbo_available_locations |
$locations |
Register custom price display locations |
pbo_force_web_component_assets |
$force |
Force preload web component JS assets |
price_builder_opus_custom_fonts |
$fonts |
Add custom fonts to the selection |
price_builder_opus_google_fonts |
$fonts |
Extend the Google Fonts list |