get_feed_currency(); add_filter( 'wc_aelia_cs_selected_currency', function ( $selected_currency ) use ( $currency_code ) { // phpcs:ignore return $currency_code; }, 99999 ); // WooCommerce Out of Stock visibility override if ( ! $config->get_outofstock_visibility() ) { return; } // just return false as wc expect the value should be 'yes' with eqeqeq (===) operator. add_filter( 'pre_option_woocommerce_hide_out_of_stock_items', '__return_false', 999 ); } /** * Get product link with currency suffix. * * @param string $link product link. * @param \WC_Product $product product object. * @param \CTXFeed\V5\Utility\Config $config config object. * @return string */ public function get_product_link_with_suffix( $link, $product, $config ) { // phpcs:ignore $jointer = substr( $link, - 1 ) == '/' ? '?' : '&'; $currency_suffix = $jointer . 'aelia_cs_currency=' . $config->get_feed_currency(); $link .= $currency_suffix; return $link; } }