jetformbuilder
/
compatibility
/
woocommerce
/
methods
/
wc-product-modification
/
product-width-property.php
base-product-property.php
2 years ago
product-backorders-property.php
2 years ago
product-catalog-visibility-property.php
2 years ago
product-cross-sell-ids-property.php
2 years ago
product-date-on-sale-from-property.php
2 years ago
product-date-on-sale-to-property.php
2 years ago
product-date-property.php
1 year ago
product-description-property.php
1 year ago
product-featured-property.php
2 years ago
product-gallery-property.php
2 years ago
product-height-property.php
2 years ago
product-id-property.php
1 year ago
product-image-property.php
1 year ago
product-length-property.php
2 years ago
product-low-stock-amount-property.php
1 year ago
product-manage-stock-property.php
1 year ago
product-name-property.php
1 year ago
product-parent-property.php
1 year ago
product-regular-price-property.php
2 years ago
product-reviews-allowed-property.php
1 year ago
product-sale-price-property.php
2 years ago
product-short-description-property.php
1 year ago
product-sku-property.php
2 years ago
product-sold-individually-property.php
1 year ago
product-status-property.php
1 year ago
product-stock-quantity-property.php
1 year ago
product-stock-status-property.php
1 year ago
product-tax-class-property.php
1 year ago
product-tax-status-property.php
1 year ago
product-total-sales-property.php
1 year ago
product-upsell-ids-property.php
2 years ago
product-weight-property.php
2 years ago
product-width-property.php
2 years ago
save-action.php
1 year ago
trash-action.php
1 year ago
wc-product-modifier.php
1 year ago
product-width-property.php
31 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace JFB_Compatibility\Woocommerce\Methods\Wc_Product_Modification; |
| 5 | |
| 6 | use Jet_Form_Builder\Actions\Methods\Abstract_Modifier; |
| 7 | use Jet_Form_Builder\Exceptions\Silence_Exception; |
| 8 | |
| 9 | // If this file is called directly, abort. |
| 10 | if ( ! defined( 'WPINC' ) ) { |
| 11 | die; |
| 12 | } |
| 13 | |
| 14 | class Product_Width_Property extends Base_Product_Property { |
| 15 | |
| 16 | public function get_id(): string { |
| 17 | return '_width'; |
| 18 | } |
| 19 | |
| 20 | public function get_label(): string { |
| 21 | return __( 'Product Width', 'jet-form-builder' ); |
| 22 | } |
| 23 | |
| 24 | public function get_value( Abstract_Modifier $modifier ) { |
| 25 | parent::get_value( $modifier ); |
| 26 | $product = $this->get_product( $modifier ); |
| 27 | |
| 28 | $product->set_width( $this->value ); |
| 29 | } |
| 30 | } |
| 31 |