block.json
1 year ago
controller.php
1 year ago
index-rtl.css
11 months ago
index.asset.php
6 months ago
index.css
11 months ago
index.js
6 months ago
style-index-rtl.css
1 year ago
style-index.css
1 year ago
view.php
4 months ago
controller.php
16 lines
| 1 | <?php |
| 2 | $product = sc_get_product(); |
| 3 | |
| 4 | // Get block attributes. |
| 5 | $width = isset( $attributes['width'] ) ? esc_attr( $attributes['width'] ) : '600px'; |
| 6 | |
| 7 | // Create inline style for CSS variables. |
| 8 | $style = sprintf( |
| 9 | '--sc-sticky-purchase-width: %s;', |
| 10 | $width |
| 11 | ); |
| 12 | |
| 13 | $show_sticky_purchase_button = $block->context['showStickyPurchaseButton'] ?? 'never'; |
| 14 | |
| 15 | return 'file:./view.php'; |
| 16 |