require_once not working in plugin wordpress

The issue was resolved. I had to hook the custom classes to the customize_register action hook. Something like this – function itlst_extend_customize_control() { if ( class_exists(‘WP_Customize_Control’) ) { class itlst_WP_Customize_Property_Control extends WP_Customize_Control { /** * Render the control’s content. */ public function render_content() { $dropdown = wp_dropdown_categories( array( ‘name’ => ‘_customize-dropdown-categories-‘ . $this->id, ‘echo’ => … Read more

co-authors plugin – inline listing

solved using for loop instead of foreach: function inl_users() { if ( function_exists( ‘get_coauthors’ ) ) { $coauthors = get_coauthors(); for ($i = 0; $i < count($coauthors); $i++){ $autArray[] = ‘<a href=”https://wordpress.stackexchange.com/questions/404167/. get_author_posts_url( $coauthors[$i]->ID ) .”>’ . $coauthors[$i]->display_name . ‘</a>’; } echo implode(“, “, $autArray); } does anoyone know why?

WooCommerce – new order email hook

A list of all the WooCommerce hooks can be found here. The way I understand it, e-mail sending is handled by way of the WC_Email class by way of the ->send() method. According to the code, it looks like the woocommerce_mail_callback_params hook might be for what you are looking.

Checkbox show / hide output result

For saving the checkbox, one easy way to check, if the checkbox was checked is to use empty() function. The checkbox key and value exists in $_POST only, if it was checked when the form was submitted. For example, function snup_save_meta($post_id) { // nonce check etc. // save text $snupText = $_POST[‘snuptext’] ?? ”; update_post_meta( … Read more