Function tied to woocommerce_payment_complete_order_status blocks “processing” order status

Most likely the reason this is hanging is because hook you are using is not complete. woocommerce_payment_complete_order_status is a hook for a filter but you are using an add_action. The hook for the add_action should be woocommerce_payment_complete_order_status_{$get_status} resource for filter http://hookr.io/plugins/woocommerce/3.0.6/filters/woocommerce_payment_complete_order_status/ apply_filters( ‘woocommerce_payment_complete_order_status’, ‘create_fundraiser_purchase_post’, 10, 2 ); resource for action http://hookr.io/plugins/woocommerce/3.0.6/actions/woocommerce_payment_complete_order_status_get_status/ add_action( ‘woocommerce_payment_complete_order_status_{$get_status}’, ‘create_fundraiser_purchase_post’, 10, … Read more

Display only custom post type count for current author on the “At a Glance” dashboard widget

I think what you’re after is: // The user is logged, retrieve the user id (this needs to go above your foreach) $user_ID = get_current_user_id(); // Now we have got the user’s id, we can pass it to the foreach of your function(this needs to go into your foreach: echo ‘<li>Number of ‘.$post_type->name.’ posts published … Read more

How to add notification in the sidebar of the administration panel when a Custom post type is created? [duplicate]

It is shockingly simple: you have to dyamically set the admin page title, adding a specific markup: <span class=”awaiting-mod count-3″> <span class=”pending-count”>3</span> </span> So for example if you want to show the number of custom posts you have to do something like this when declaring the options page: $notif_count = wp_count_posts(‘my_post_type’); //insert your post type … Read more

Disabling post_type in URL

I think you might be able to accomplish this via filter. Looking at the core wp class you’ll find the $public_query_vars and $private_query_varsvariables defined by a hardcoded array. These could probably be overriden/changed via the global $wp object but if you dig a bit deeper there’s a filter that should let you remove items from … Read more