multi_currency = $multi_currency;
$this->init_actions_and_filters();
}
/**
* Adds the CSS to the head of the page.
*
* @return void
*/
public function add_inline_css() {
$css = '
#woocommerce-payments-multi-currency-storefront-widget {
float: right;
}
#woocommerce-payments-multi-currency-storefront-widget form {
margin: 0;
}
';
wp_add_inline_style(
'storefront-style',
apply_filters( MultiCurrency::FILTER_PREFIX . 'storefront_widget_css', $css )
);
}
/**
* This modifies the breadcrumb defaults for us to be able to place the widget.
*
* @param array $defaults The defaults breadcrumb properties.
*
* @return array The modified defaults properties.
*/
public function modify_breadcrumb_defaults( array $defaults ): array {
// Set the instance and args arrays for the widget.
$instance = apply_filters( MultiCurrency::FILTER_PREFIX . 'storefront_widget_instance', [] );
$args = apply_filters(
MultiCurrency::FILTER_PREFIX . 'storefront_widget_args',
[
'before_widget' => '
',
'after_widget' => '
',
]
);
/**
* Some storefront child themes use different wrappers and styles. We need to place the widget before
* the