Server IP : 192.158.238.246 / Your IP : 3.22.27.22 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/jenniferflocom/www/wp-content/plugins/woocommerce/src/Internal/Admin/ProductForm/ |
Upload File : |
<?php /** * Handles product form field related methods. */ namespace Automattic\WooCommerce\Internal\Admin\ProductForm; /** * Field class. */ class Field extends Component { /** * Constructor * * @param string $id Field id. * @param string $plugin_id Plugin id. * @param array $additional_args Array containing the necessary arguments. * $args = array( * 'type' => (string) Field type. Required. * 'section' => (string) Field location. Required. * 'order' => (int) Field order. * 'properties' => (array) Field properties. * ). * @throws \Exception If there are missing arguments. */ public function __construct( $id, $plugin_id, $additional_args ) { parent::__construct( $id, $plugin_id, $additional_args ); $this->required_arguments = array( 'type', 'section', 'properties.name', 'properties.label', ); $missing_arguments = self::get_missing_arguments( $additional_args ); if ( count( $missing_arguments ) > 0 ) { throw new \Exception( sprintf( /* translators: 1: Missing arguments list. */ esc_html__( 'You are missing required arguments of WooCommerce ProductForm Field: %1$s', 'woocommerce' ), join( ', ', $missing_arguments ) ) ); } } }