meglio
Forum Replies Created
-
Forum: Plugins
In reply to: [Responsive Google Map] Hi-res Marker images, using SVG or hi-res PNGThanks for looking into it, here is the PNG image.
Download it from https://ibb.co/WH55Hpp
- This reply was modified 3 years, 11 months ago by meglio.
Sounds good, hope you succeed and make your plugin fundamentally better than most crap that’s out there. There are simply too many plugins that try to solve some real problems, but you can never use them because they’re either buggy, or incomplete, or incompatible, or ugly, or … all together. Make something that just works and is deeply integrated with WordPress, well, the “wordpress-way”, and that’s already enough to succeed.
@gavinohanlon it is not a good idea to mark an issue resolved while it is not.
The notice says:
> Trying to get property ‘post_type’ of non-object
So it is clear that the
$post
global object is empty, and the piece of code that uses the variable is not defensive enough – it does not check if the$post
is non-empty. You should add the check to the code and make it fail gracefully without notices if the$post
global is empty.There is no need to reproduce this issue in order to fix it, as the reason that leads to the issue is seen in the code directly.
Hope this helps,
Anton
Also see a screenshot with an example of AJAX response returning text with HTML tags stripped: https://monosnap.com/file/0ONpAv5488enntcLb2fvCflRHfc4Wy.png
For some reason, Vendors also have
edit_others_posts
ON by default (can bee seen in the User Role Editor plugin panel).I +1 for making Posts and Pages available for Vendors – so that they can blog and create pages specific?to their store.
As a workaround, I just allowed the corresponding capabilities through the User Roles Manager.
I think I got it:
// Make On-hold orders visible to vendors add_filter('wcmp_completed_commission_statuses', function($statuses) { if (!in_array('on-hold', $statuses)) { $statuses = array_merge(['on-hold'], $statuses); } return $statuses; }, 10, 1);
@dualcube, now, after the vendor marks an order as “shipped”, it still shows as “On-hold”. Where should I hook to automatically mark the order as “Completed” as soon as it’s marked as “Shipped” by the vendor? — Many thanks for your help!
I added the following two hooks making “pending” a “completed” status, not a “reversed” status (even though I’m not pretty sure why a “pending” was “completed” – may you elaborate pls?)
// Make Pending orders visible to vendors add_filter('wcmp_completed_commission_statuses', function($statuses) { if (!in_array('pending', $statuses)) { $statuses = array_merge(['pending'], $statuses); } return $statuses; }, 10, 1); // Make Pending orders visible to vendors add_filter('wcmp_reversed_commission_statuses', function($statuses) { $ind = array_search('pending', $statuses); if ($ind !== false) { unset($statuses[$ind]); } // Reset index return array_values($statuses); }, 10, 1);
Now, it didn’t help: vendors still don’t see?pending orders in their dashboard. What am I missing?
Would you consider adding a setting for the shop admin to let vendors see the “On Hold” orders (OFF by default)?
P.S. Sent you an email to
[email protected]
as suggested.@dualcube, there’s an issue in the code snipped above.
The
if
check is the same for two blocks:if (!array_key_exists('singleproductmultivendor'))
For the “Questions and Answers” tab, the check should be:
if (!array_key_exists('wcmp_customer_qna'))
Thanks, makes sense!
My progress: successfully hooked in
wcmp_vendor_dashboard_nav
to adapt both sidebar and header menus of the Vendor dashboard to my needs.Thanks, it worked like a charm!
My question still remains re marking orders are shipped:
Will vendors be able to mark products as shipped from the native WooCommerce product management panel?
Thanks in advanced for your prompt replies.
Please see the following screenshots:
1. Thank you page (order confirmation):
https://monosnap.com/file/Ogu2lNCtcO0MCFdc0XTo2FOWYimihf.png2. Order details emails sent to the shop manager AND order details email sent to the client:
https://monosnap.com/file/VyniS6mSqn2u7IeXSJlvTE3jNg8DUY.png3. Native WooCommerce Order Details screen:
https://monosnap.com/file/Iw89ZgQKNcAzMNPIx05MykWfigvTSc.pngAs you can see, the new “Weight” detail is available everywhere except the WCMp Vendor Orders Details screen.
it seems like WooCommerce Measurement Price is not compatible with WC Marketplace
Hm, so it’s compatible with WooCommerce – all emails and order details in the standard WooCommerce orders management panel do include custom product weight attribute.
It looks like the issue is with WCMp not calling all filters as needed when displaying the orders table. Would you consider fixing it?
Oh, so in your language files, you’re using strings like
Shipping
instead ofShipping
? This is not a good idea and not a common practice.What if you create a dedicated string, like
%s Shipping
with a note to translators that%s
is for vendor name?While integrating your plugin into our store, I noticed there are many places like this in the code, and after applying my translations, I ended up seeing a lot of “no-space” phrases in the user interface.
In general, it’s not good to compose sentences and phrases out of dedicated strings that are translatable on their own. This way translators cannot adapt the translation to match the sequence of words in the best possible way. For instance, in Russian I’d say “Доставка Созидора”, where the first word translates to “Shipping”, and the second word is the vendor name. So it’s basically
Shipping %s
, which sounds more naturally in Russian (also in Ukrainian).Yes, there is no such settings for this. However, you can add this setting using this filter woocommerce_shipping_package_name
The issue is, I can’t. That’s because this is not a filter of your plugin, but rather a filter of WooCommerce plugin. This means I can REPLACE the shipping package name by my own version, but I can’t HOOK INTO the process of prefixing it. Hm?