MulticurrencyHooks.php
20 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\Compatibility\WpSuperCache; |
| 4 | |
| 5 | use WPML\FP\Lst; |
| 6 | use WPML\FP\Fns; |
| 7 | |
| 8 | class MulticurrencyHooks implements \IWPML_Action { |
| 9 | |
| 10 | public function add_hooks() { |
| 11 | add_filter( 'wcml_multicurrency_supported_cache_plugins', Lst::append( 'WP Super Cache' ) ); |
| 12 | |
| 13 | add_filter( 'wcml_user_store_strategy', Fns::always( 'cookie' ) ); |
| 14 | |
| 15 | do_action( 'wpsc_add_cookie', 'wcml_client_currency' ); |
| 16 | do_action( 'wpsc_add_cookie', 'client_currency_switched' ); |
| 17 | } |
| 18 | |
| 19 | } |
| 20 |