where is admin footer?

So the question that you found this code from here says that they added this to the admin_footer action. So you could add that custom_bulk_admin_footer to your functions.php, and then hook it into the admin_footer action with this after the function: add_action(‘admin_footer’, ‘custom_bulk_admin_footer’); Obviously you need to change the jQuery code to do what you … Read more

Dynamic subdomains for woocommerce affiliate sales but NO multisite. Is that possible?

It’s as possible/impossible as you have time/budget for. It seems achievable to me, given that I’m assuming you’re a for-profit organisation and this is generating you revenue somehow, but you might end up hacking some WordPress internals at some point. It’s a broad and subjective question, which is not ideally suited to this stackexchange, but … Read more

How sort products by calculate value? ( custom post meta, price, option)

Firstly i added table postmeta to query function add_join_clause_to_view_sql( $join, $wpq ) { global $wpdb; if( $wpq->query[‘orderby’] === ‘price’ || $wpq->query[‘orderby’] === ‘price-desc’) { $post_meta_table_name = $wpdb->postmeta; $post_table_name = $wpdb->posts; $join .= ” LEFT JOIN $post_meta_table_name ON $post_meta_table_name.post_id = $post_table_name.id “; } return $join; } add_filter(‘posts_join’, ‘add_join_clause_to_view_sql’, 10, 2); Secondly i added meta_key in WHERE … Read more

Link product attribute value to a URL – woocommerce

With the current WooCommerce release, try this instead of the make_product_atts_linkable() function in the question: function make_product_atts_linkable( $text, $attribute, $values ) { $vals = array(); if ( $attribute->is_taxonomy() ) { foreach ( $attribute->get_options() as $i => $id ) { if ( $url = get_term_meta( $id, ‘attribute_url’, true ) ) { $vals[] = ‘<a href=”‘ . … Read more

Getting WordPress fatal error when hitting WooCommerce API

So, after fiddling with this all week, i finally found the solution. In my original script, i asked for 99999 products with this line: $products = $woocommerce->get(‘products’, $parameters=[‘per_page’ => 99999]); I also had this function in functions.php in WP: function maximum_api_filter($query_params) { $query_params[‘per_page’][“maximum”]= 99999; return $query_params; } add_filter(‘rest_product_collection_params’, ‘maximum_api_filter’); The new changes i made to … Read more