mirror of
https://github.com/wp-graphql/wp-graphql-woocommerce.git
synced 2026-08-14 12:53:44 +02:00
* feat: docs started. Unsupported product type implemented. * chore: WPCS compliance met * chore: file renamed. * feat: More docs written * feat: 2 more docs written * fix: settings docs images added. * fix: settings docs images added. * devops: UnsupportProductTypeTest added. * devops: More docs changes. * chore: WPCS compliance met * devops: UnsupportedProductTypeTest updated. * chore: WPCS compliance met
39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
/**
|
|
* Defines WooGraphQL's general settings.
|
|
*
|
|
* @package WPGraphQL\WooCommerce\Admin
|
|
*/
|
|
|
|
namespace WPGraphQL\WooCommerce\Admin;
|
|
|
|
/**
|
|
* General class
|
|
*/
|
|
class General extends Section {
|
|
|
|
/**
|
|
* Returns General settings fields.
|
|
*
|
|
* @return array
|
|
*/
|
|
public static function get_fields() {
|
|
return [
|
|
[
|
|
'name' => 'disable_ql_session_handler',
|
|
'label' => __( 'Disable QL Session Handler', 'wp-graphql-woocommerce' ),
|
|
'desc' => __( 'The QL Session Handler takes over management of WooCommerce Session Management on WPGraphQL request replacing the usage of HTTP Cookies with JSON Web Tokens.', 'wp-graphql-woocommerce' ),
|
|
'type' => 'checkbox',
|
|
'default' => 'off',
|
|
],
|
|
[
|
|
'name' => 'enable_unsupported_product_type',
|
|
'label' => __( 'Enable Unsupported types', 'wp-graphql-woocommerce' ),
|
|
'desc' => __( 'Substitute unsupported product types with SimpleProduct', 'wp-graphql-woocommerce' ),
|
|
'type' => 'checkbox',
|
|
'default' => 'off',
|
|
],
|
|
];
|
|
}
|
|
}
|