Files
wp-graphql-woocommerce/includes/class-admin.php
T
Geoff TaylorandGitHub edbd31c3bd devops: Name officially changed to "WPGraphQL for WooCommerce" (#900)
* devops: Name officially changed to "WPGraphQL for WooCommerce"

* devops: GA workflow environment updated

* devops: GA workflow environment updated

* devops: composer-git-hooks downgraded to "2.8.5"

* devops: Unstable session manager tests skipped

* chore: cleanup applied

* devops: Docker configurations updated

* devops: Docker configurations updated

* devops: Docker configurations updated

* devops: Docker configurations updated

* devops: Docker configurations updated
2024-11-06 19:23:36 -05:00

43 lines
883 B
PHP

<?php
/**
* Initializes a WooGraphQL Pro admin settings.
*
* @package WPGraphQL\WooCommerce\Pro
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce;
use WPGraphQL\Admin\Settings\Settings;
use WPGraphQL\WooCommerce\Admin\General;
/**
* Class Admin
*/
class Admin {
/**
* Admin constructor
*/
public function __construct() {
add_action( 'graphql_register_settings', [ $this, 'register_settings' ] );
}
/**
* Registers the WPGraphQL for WooCommerce Settings tab.
*
* @param \WPGraphQL\Admin\Settings\Settings $manager Settings Manager.
* @return void
*/
public function register_settings( Settings $manager ) {
$manager->settings_api->register_section(
'woographql_settings',
[ 'title' => __( 'WooCommerce', 'wp-graphql-woocommerce' ) ]
);
$manager->settings_api->register_fields(
'woographql_settings',
General::get_fields()
);
}
}