Created
June 21, 2021 09:41
-
-
Save alamgircsebd/872ffb89891c49aa14afb84a65cfe4f5 to your computer and use it in GitHub Desktop.
Dokan setting get support option force always checked
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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