File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 44$ settings ['store_id ' ] = get_option ( 'WC_settings_wootoapp_site_id ' );
55$ settings ['secret_key ' ] = get_option ( 'WC_settings_wootoapp_secret_key ' );
66
7+ $ force_use_local = false ;
8+ $ force_use_local_db = false ;
79$ dev_url = "www.wooc.local " ;
8- $ use_local_react = true ; // $_SERVER['HTTP_HOST'] === $dev_url;
9- $ use_prod_db = true ; //!($ _SERVER['HTTP_HOST'] === $dev_url);
10+ $ use_local_react = $ _SERVER ['HTTP_HOST ' ] === $ dev_url || $ force_use_local ; //true ;
11+ $ use_prod_db = ( $ force_use_local_db || ( $ _SERVER ['HTTP_HOST ' ] === $ dev_url )) ? false : true ;
1012
11- $ using_some_dev_params = $ use_local_react || ! $ use_prod_db ;
13+ $ using_some_dev_params = !!( $ force_use_local || $ force_use_local_db ) ;
1214$ args = array (
1315 'taxonomy ' => "product_cat " ,
1416 'number ' => $ number ,
4345 secret_key: '<?php echo str_replace ( "\' " , "" , $ settings ['secret_key ' ]); ?> '
4446 },
4547 environment: "<?php echo $ use_prod_db ? "prod " : "dev " ; ?> ",
46- has_dev_params: <?php echo $ using_some_dev_params ;?> ,
48+ has_dev_params: <?php echo $ using_some_dev_params ? " true " : " false " ;?> ,
4749 categories: <?php echo json_encode ($ product_categories ); ?> ,
4850 pages: <?php echo json_encode (get_pages ()); ?> ,
4951 woo_currencies: <?php echo json_encode (get_woocommerce_currencies ()); ?> ,
You can’t perform that action at this time.
0 commit comments