PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.0.8
JetFormBuilder — Dynamic Blocks Form Builder v3.0.8
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / includes / compatibility / woocommerce / woocommerce.php
jetformbuilder / includes / compatibility / woocommerce Last commit date
methods 3 years ago woocommerce.php 3 years ago
woocommerce.php
52 lines
1 <?php
2
3
4 namespace Jet_Form_Builder\Compatibility\Woocommerce;
5
6 use Jet_Form_Builder\Compatibility\Woocommerce\Methods\Wc_Product_Modification\Wc_Product_Modifier;
7
8 class Woocommerce {
9
10 public static function register() {
11 if ( ! function_exists( 'WC' ) ) {
12 return;
13 }
14 new static();
15 }
16
17 private function __construct() {
18 add_filter(
19 'jet-form-builder/action/insert-post/modifiers',
20 array( $this, 'add_modifiers' )
21 );
22
23 add_filter(
24 'jet-form-builder/editor/config',
25 array( $this, 'add_property_to_editor' )
26 );
27 }
28
29 public function add_modifiers( array $modifiers ): array {
30 $modifiers[] = new Wc_Product_Modifier();
31
32 return $modifiers;
33 }
34
35 /**
36 * @param array $config
37 *
38 * @return array
39 * @since 3.0.4
40 *
41 * We pass the value to js config to make sure that WooCommerce
42 * is installed in the Insert Post action script
43 */
44 public function add_property_to_editor( array $config ): array {
45 $config['wooExist'] = true;
46
47 return $config;
48 }
49
50
51 }
52