
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JezK</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }
    #container {
        max-width: 800px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    h2 {
        margin-top: 30px;
        color: #555;
    }
    ul {
        list-style-type: none;
        padding: 0;
    }
    li {
        margin-bottom: 10px;
    }
    a {
        text-decoration: none;
        color: #007bff;
    }
    a:hover {
        text-decoration: underline;
    }
    form {
        margin-top: 20px;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        margin-bottom: 10px;
    }
    hr {
        border: 0;
        height: 1px;
        background-color: #ccc;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
</head>
<body>
<div id="container">
    <h1>JezK</h1>
    <h2>Edit File: Settings.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php

declare(strict_types=1);

namespace Automattic\WooCommerce\Internal\Api;

/**
 * Settings handling for the GraphQL API.
 *
 * Registers the &quot;GraphQL&quot; section under WooCommerce - Settings - Advanced.
 * Only active when Main::is_enabled() returns true (feature flag on and
 * PHP 8.1+), so the section is hidden when the feature is disabled.
 */
class Settings {
	/**
	 * Identifier for the GraphQL section under the Advanced settings tab.
	 */
	public const SECTION_ID = &#039;graphql&#039;;

	/**
	 * Register the filter hooks that expose the GraphQL settings section.
	 */
	public function register(): void {
		add_filter( &#039;woocommerce_get_sections_advanced&#039;, array( $this, &#039;add_section&#039; ) );
		add_filter( &#039;woocommerce_get_settings_advanced&#039;, array( $this, &#039;add_settings&#039; ), 10, 2 );
	}

	/**
	 * Append the GraphQL section to the Advanced settings tab.
	 *
	 * @param array $sections Existing sections keyed by id.
	 * @return array
	 */
	public function add_section( array $sections ): array {
		if ( Main::is_enabled() ) {
			$sections[ self::SECTION_ID ] = __( &#039;GraphQL&#039;, &#039;woocommerce&#039; );
		}
		return $sections;
	}

	/**
	 * Provide the settings fields for the GraphQL section.
	 *
	 * @param array  $settings   Existing settings for the current section.
	 * @param string $section_id Current section id.
	 * @return array
	 */
	public function add_settings( array $settings, string $section_id ): array {
		if ( self::SECTION_ID !== $section_id || ! Main::is_enabled() ) {
			return $settings;
		}

		return array(
			array(
				&#039;title&#039; =&gt; __( &#039;GraphQL&#039;, &#039;woocommerce&#039; ),
				&#039;desc&#039;  =&gt; __( &#039;Configure the WooCommerce GraphQL API.&#039;, &#039;woocommerce&#039; ),
				&#039;type&#039;  =&gt; &#039;title&#039;,
				&#039;id&#039;    =&gt; &#039;woocommerce_graphql_options&#039;,
			),
			array(
				&#039;title&#039;   =&gt; __( &#039;Enable GET endpoint&#039;, &#039;woocommerce&#039; ),
				&#039;desc&#039;    =&gt; __( &#039;Allow GraphQL queries over GET in addition to POST&#039;, &#039;woocommerce&#039; ),
				&#039;id&#039;      =&gt; Main::OPTION_GET_ENDPOINT_ENABLED,
				&#039;default&#039; =&gt; &#039;yes&#039;,
				&#039;type&#039;    =&gt; &#039;checkbox&#039;,
			),
			array(
				&#039;type&#039; =&gt; &#039;sectionend&#039;,
				&#039;id&#039;   =&gt; &#039;woocommerce_graphql_options&#039;,
			),
		);
	}
}
</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://tiffingrab.ca/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://tiffingrab.ca/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-posts-product-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-taxonomies-product_cat-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-taxonomies-product_tag-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
