=> 'string',
'context' => array( 'view', 'edit' ),
),
'description' => array(
'description' => __( 'Payment gateway description on checkout.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
),
'order' => array(
'description' => __( 'Payment gateway sort order.', 'woocommerce' ),
'type' => 'integer',
'context' => array( 'view', 'edit' ),
'arg_options' => array(
'sanitize_callback' => 'absint',
),
),
'enabled' => array(
'description' => __( 'Payment gateway enabled status.', 'woocommerce' ),
'type' => 'boolean',
'context' => array( 'view', 'edit' ),
),
'method_title' => array(
'description' => __( 'Payment gateway method title.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'method_description' => array(
'description' => __( 'Payment gateway method description.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'method_supports' => array(
'description' => __( 'Supported features for this payment gateway.', 'woocommerce' ),
'type' => 'array',
'context' => array( 'view', 'edit' ),
'readonly' => true,
'items' => array(
'type' => 'string',
),
),
'settings' => array(
'description' => __( 'Payment gateway settings.', 'woocommerce' ),
'type' => 'object',
'context' => array( 'view', 'edit' ),
'properties' => array(
'id' => array(
'description' => __( 'A unique identifier for the setting.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'label' => array(
'description' => __( 'A human readable label for the setting used in interfaces.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'description' => array(
'description' => __( 'A human readable description for the setting used in interfaces.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'type' => array(
'description' => __( 'Type of setting.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'enum' => array( 'text', 'email', 'number', 'color', 'password', 'textarea', 'select', 'multiselect', 'radio', 'image_width', 'checkbox' ),
'readonly' => true,
),
'value' => array(
'description' => __( 'Setting value.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
),
'default' => array(
'description' => __( 'Default value for the setting.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'tip' => array(
'description' => __( 'Additional help text shown to the user about the setting.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'placeholder' => array(
'description' => __( 'Placeholder text to be displayed in text inputs.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
),
),
),
);
return $this->add_additional_fields_schema( $schema );
}
}
Fatal error: Uncaught Error: Class 'WC_REST_Payment_Gateways_Controller' not found in /home/mpir1/public_html/wp-content/plugins/woocommerce/includes/rest-api/Server.php:42
Stack trace:
#0 /home/mpir1/public_html/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\RestApi\Server->register_rest_routes(Object(WP_REST_Server))
#1 /home/mpir1/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#2 /home/mpir1/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#3 /home/mpir1/public_html/wp-includes/rest-api.php(577): do_action('rest_api_init', Object(WP_REST_Server))
#4 /home/mpir1/public_html/wp-includes/rest-api.php(403): rest_get_server()
#5 /home/mpir1/public_html/wp-includes/class-wp-hook.php(308): rest_api_loaded(Object(WP))
#6 /home/mpir1/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#7 /home/mpir1/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
#8 /home/mpir1/public_html/wp-includes/class-wp.php(399): do_actio in /home/mpir1/public_html/wp-content/plugins/woocommerce/includes/rest-api/Server.php on line 42