@@ -813,39 +813,13 @@ public function config_lazyload() {
813
813
}
814
814
}
815
815
816
- /**
817
- * Get the terms of service choice.
818
- *
819
- * @since 2.0.0
820
- *
821
- * @see \W3TC\Util_Environment::is_w3tc_pro()
822
- * @see \W3TC\Dispatcher::config_state()
823
- * @see \W3TC\Dispatcher::config_state_master()
824
- * @see \W3TC\ConfigState::get_string()
825
- *
826
- * @return string
827
- */
828
- private function get_tos_choice () {
829
- $ config = new Config ();
830
-
831
- if ( Util_Environment::is_w3tc_pro ( $ config ) ) {
832
- $ state = Dispatcher::config_state ();
833
- $ terms = $ state ->get_string ( 'license.terms ' );
834
- } else {
835
- $ state_master = Dispatcher::config_state_master ();
836
- $ terms = $ state_master ->get_string ( 'license.community_terms ' );
837
- }
838
-
839
- return $ terms ;
840
- }
841
-
842
816
/**
843
817
* Display the terms of service dialog if needed.
844
818
*
845
819
* @since 2.0.0
846
820
* @access private
847
821
*
848
- * @see self ::get_tos_choice()
822
+ * @see Licensing_Core ::get_tos_choice()
849
823
*
850
824
* @return bool
851
825
*/
@@ -854,7 +828,7 @@ private function maybe_ask_tos() {
854
828
return false ;
855
829
}
856
830
857
- $ terms = $ this -> get_tos_choice ();
831
+ $ terms = Licensing_Core:: get_tos_choice ();
858
832
859
833
return 'accept ' !== $ terms && 'decline ' !== $ terms && 'postpone ' !== $ terms ;
860
834
}
@@ -871,6 +845,7 @@ private function maybe_ask_tos() {
871
845
* @see \W3TC\Config::get_boolean()
872
846
* @see \W3TC\Util_Request::get_string()
873
847
* @see \W3TC\Dispatcher::config_state()
848
+ * @see \W3TC\Licensing_Core::get_tos_choice()
874
849
* @see \W3TC\Util_Environment::home_url_host()
875
850
* @see \W3TC\Util_Environment::w3tc_edition()
876
851
* @see \W3TC\Util_Widget::list_widgets()
@@ -914,7 +889,7 @@ private function get_config() {
914
889
'w3tc_edition ' => esc_attr ( Util_Environment::w3tc_edition ( $ config ) ),
915
890
'list_widgets ' => esc_attr ( Util_Widget::list_widgets () ),
916
891
'ga_profile ' => ( defined ( 'W3TC_DEBUG ' ) && W3TC_DEBUG ) ? 'UA-2264433-7 ' : 'UA-2264433-8 ' ,
917
- 'tos_choice ' => $ this -> get_tos_choice (),
892
+ 'tos_choice ' => Licensing_Core:: get_tos_choice (),
918
893
'track_usage ' => $ config ->get_boolean ( 'common.track_usage ' ),
919
894
'test_complete_msg ' => __ (
920
895
'Testing complete. Click Next to advance to the section and see the results. ' ,
0 commit comments