wc_autoship_addons_settings (filter)

Add custom settings to be displayed with Autoship Addons Settings.

Example

<?php


/**
* @param array $autoship_settings
* @return array
*/
function wc_autoship_addons_settings_example( $autoship_settings ) {
  // Add a custom setting 
  $my_setting = array(
    'name'     => __( 'my_custom_setting', 'my-plugin' ),
    'desc'     => __( 'Description of setting', 'my-plugin' ),
    'desc_tip' => false,
    'type'     => 'checkbox',
    'id'       => 'my_plugin_setting_id'
  );
  array_push( $autoship_settings, $my_setting )
}
add_filter( 'wc_autoship_addons_settings', 'wc_autoship_addons_settings_example', 10, 1 );

Still need help? Contact Us Contact Us