Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/woocomme.../src/Admin
File: DataSourcePoller.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Automattic\WooCommerce\Admin;
[2] Fix | Delete
[3] Fix | Delete
use Automattic\WooCommerce\Admin\RemoteSpecs\DataSourcePoller as RemoteSpecsDataSourcePoller;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Specs data source poller class.
[7] Fix | Delete
* This handles polling specs from JSON endpoints, and
[8] Fix | Delete
* stores the specs in to the database as an option.
[9] Fix | Delete
*
[10] Fix | Delete
* @deprecated since 8.8.0
[11] Fix | Delete
*/
[12] Fix | Delete
abstract class DataSourcePoller extends RemoteSpecsDataSourcePoller {
[13] Fix | Delete
/**
[14] Fix | Delete
* Log a deprecation to the error log.
[15] Fix | Delete
*/
[16] Fix | Delete
private static function log_deprecation() {
[17] Fix | Delete
/**
[18] Fix | Delete
* Note: Deprecation messages have been temporarily disabled due to upgrade issues.
[19] Fix | Delete
* For more details, see the discussion in the WooCommerce GitHub repository:
[20] Fix | Delete
* https://github.com/woocommerce/woocommerce/pull/45892.
[21] Fix | Delete
*/
[22] Fix | Delete
}
[23] Fix | Delete
[24] Fix | Delete
/**
[25] Fix | Delete
* Constructor.
[26] Fix | Delete
*
[27] Fix | Delete
* @param string $id id of DataSourcePoller.
[28] Fix | Delete
* @param array $data_sources urls for data sources.
[29] Fix | Delete
* @param array $args Options for DataSourcePoller.
[30] Fix | Delete
*/
[31] Fix | Delete
public function __construct( $id, $data_sources = array(), $args = array() ) {
[32] Fix | Delete
self::log_deprecation();
[33] Fix | Delete
parent::__construct( $id, $data_sources, $args );
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
/**
[37] Fix | Delete
* Reads the data sources for specs and persists those specs.
[38] Fix | Delete
*
[39] Fix | Delete
* @deprecated 8.8.0
[40] Fix | Delete
* @return array list of specs.
[41] Fix | Delete
*/
[42] Fix | Delete
public function get_specs_from_data_sources() {
[43] Fix | Delete
self::log_deprecation();
[44] Fix | Delete
return parent::get_specs_from_data_sources();
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Reads the data sources for specs and persists those specs.
[49] Fix | Delete
*
[50] Fix | Delete
* @deprecated 8.8.0
[51] Fix | Delete
* @return bool Whether any specs were read.
[52] Fix | Delete
*/
[53] Fix | Delete
public function read_specs_from_data_sources() {
[54] Fix | Delete
self::log_deprecation();
[55] Fix | Delete
return parent::read_specs_from_data_sources();
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
/**
[59] Fix | Delete
* Delete the specs transient.
[60] Fix | Delete
*
[61] Fix | Delete
* @deprecated 8.8.0
[62] Fix | Delete
* @return bool success of failure of transient deletion.
[63] Fix | Delete
*/
[64] Fix | Delete
public function delete_specs_transient() {
[65] Fix | Delete
self::log_deprecation();
[66] Fix | Delete
return parent::delete_specs_transient();
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
/**
[70] Fix | Delete
* Set the specs transient.
[71] Fix | Delete
*
[72] Fix | Delete
* @param array $specs The specs to set in the transient.
[73] Fix | Delete
* @param int $expiration The expiration time for the transient.
[74] Fix | Delete
*
[75] Fix | Delete
* @deprecated 8.8.0
[76] Fix | Delete
*/
[77] Fix | Delete
public function set_specs_transient( $specs, $expiration = 0 ) {
[78] Fix | Delete
self::log_deprecation();
[79] Fix | Delete
return parent::set_specs_transient( $specs, $expiration );
[80] Fix | Delete
}
[81] Fix | Delete
}
[82] Fix | Delete
[83] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function