Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog
AsyncGenerator::get_option_key
Returns the option key for the feed generation status.
Method of the class: AsyncGenerator{}
No Hooks.
Returns
String. The option key.
Usage
// private - for code of main (parent) class only $result = $this->get_option_key( ?array $args ): string;
- ?array $args
- .
Default:null
AsyncGenerator::get_option_key() AsyncGenerator::get option key code WC 10.8.1
private function get_option_key( ?array $args = null ): string {
$normalized_args = $args ?? array();
if ( ! empty( $normalized_args ) ) {
ksort( $normalized_args );
}
return 'feed_status_' . md5(
// WPCS dislikes serialize for security reasons, but it will be hashed immediately.
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
serialize(
array(
'integration' => $this->integration->get_id(),
'args' => $normalized_args,
)
)
);
}