$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>theme customizer - Woocommerce section name?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

theme customizer - Woocommerce section name?

matteradmin9PV0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

What is the customizer section name? I want to add a field option under customizer woocommerce section. Or how will I add a field under woocommerce option? Can someone help me with that?

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

What is the customizer section name? I want to add a field option under customizer woocommerce section. Or how will I add a field under woocommerce option? Can someone help me with that?

Share Improve this question edited Jan 21, 2019 at 7:20 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Jan 20, 2019 at 22:54 Sumon HasanSumon Hasan 1033 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

WOO custmizer settings are under 'woocommerce' customizer panel ( panel has been added since WP 4.0)

add_action('customize_register',"SE_add_options_t_woo_customizer");

function SE_add_options_t_woo_customizer($wp_customize ){
  $wp_customize->add_section( "my_new_section" , 
    array(
      'title' => "My new section",
      'priority' => 20,
      'panel' => 'woocommerce', // here is where you grab the woocommerce panel to add settings and controls to
      ) 
    );
  $wp_customize->add_setting('my_new_setting',
     array(
        'default'              => 'no',
        'type'                 => 'option',
        'capability'           => 'manage_woocommerce',
        'sanitize_callback'    => 'wc_bool_to_string',
        'sanitize_js_callback' => 'wc_string_to_bool',
    )
  );
  $wp_customize->add_control('my_new_control',
    array(
        'label'       => __( 'Control', 'woocommerce' ),
        'description' => __( 'This is my new control', 'woocommerce' ),
        'section'     => 'my_new_section',
        'settings'    => 'my_new_setting',
        'type'        => 'checkbox',
    )
);

}

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far