Fetch current_channel programatically
This commit is contained in:
parent
fb311efe08
commit
5fbefe30c3
|
@ -41,8 +41,22 @@ class WC_Beta_Tester_Admin_Menus {
|
|||
'title' => __( 'WC Beta Tester', 'woocommerce-beta-tester' ),
|
||||
) );
|
||||
|
||||
// TODO: Retrieve this programmatically.
|
||||
$current_channel = 'test';
|
||||
$current_channel = __( 'Release Candidate', 'woocommerce-beta-tester' );
|
||||
$options = get_option( 'wc_beta_tester_options' );
|
||||
if ( isset( $options['wc-beta-tester-version'] ) ) {
|
||||
switch ( $options['wc-beta-tester-version'] ) {
|
||||
case 'beta':
|
||||
$current_channel = __( 'Beta', 'woocommerce-beta-tester' );
|
||||
break;
|
||||
case 'rc':
|
||||
$current_channel = __( 'Release Candidate', 'woocommerce-beta-tester' );
|
||||
break;
|
||||
default:
|
||||
$current_channel = __( 'Stable', 'woocommerce-beta-tester' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO: Implementation of each node.
|
||||
$nodes = array(
|
||||
|
|
Loading…
Reference in New Issue