Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alamgircsebd/872ffb89891c49aa14afb84a65cfe4f5 to your computer and use it in GitHub Desktop.
Save alamgircsebd/872ffb89891c49aa14afb84a65cfe4f5 to your computer and use it in GitHub Desktop.
Dokan setting get support option force always checked
/**
* Dokan setting get support option force always checked
*/
function dokan_settign_get_support_checkbox_force_checked() {
if ( is_user_logged_in() && function_exists( 'dokan_is_seller_dashboard' ) && dokan_is_seller_dashboard() ) {
?>
<script>
(function($) {
var Dokan_Settign_Get_Support_Checkbox_Customized = {
init: function() {
$('#store-form #support_checkbox').prop('checked', true);
$('#store-form #support_checkbox_product').prop('checked', true);
},
};
$(function() {
Dokan_Settign_Get_Support_Checkbox_Customized.init();
});
})(jQuery);
</script>
<?php
}
}
add_action( 'wp_footer', 'dokan_settign_get_support_checkbox_force_checked' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment