Forum Replies Created

Viewing 15 replies - 1 through 15 (of 27 total)
  • Thread Starter richplane

    (@richplane)

    Related to this I’m also seeing ‘Undefined property: $post_parent’ because post_parent isn’t among the columns being returned by the query!

    Would you like me to submit a pull request to the SVN repo with fixes for these?

    Could this may be a PHP version issue? The “[” array syntax was introduced in PHP 5.4. If you’re on an earlier version you would see this error.

    Do you know what version you’re on?

    richplane

    (@richplane)

    In our case, I had previously renamed the ‘Uncategorised’ category and assigned products to it. The update created another “Uncategorized” category and *also* an “Uncategorised” category (presumably because UK English translations were downloaded afterwards?) I could delete ‘Uncategorized’ but not ‘Uncategorised’.

    We have a theme (child theme of Storefront) where we need to show category pages whether or not they have products in them. If I rename this (including the slug) and transfer another category into it, will it just get recreated by a future update? Or does issue #18929 fix this?

    • This reply was modified 7 years ago by richplane.
    Thread Starter richplane

    (@richplane)

    Hi Doug – I’m not sure exactly what you’re suggesting there… as far as I can see, the Advanced Cost would only achieve the same as adding tax on to the shipping method, it can’t be dependant on the product shipping class which is what I needed to achieve.

    I now have a very complicated solution which involves having a shipping method for each shipping class, and then having code hook into ‘woocommerce_package_rates’ which goes through the cart contents & examines the shipping class of each product to decide which shippping method to display.

    It does look like I’ve replicated some functionality available in that plugin – wish I’d spotted it in the extension store when I scanned through it at the start of the project. I don’t know for sure that it would do what I need, though, and this solution seems to work, so I’ll probably leave it at that.

    But preferable to all of this would be the ability to set shipping classes as taxable or not.

    Thanks for your help, anyhow

    Thread Starter richplane

    (@richplane)

    That’s great, answers how I set some customers as tax exempt, so that’s very useful, thanks.

    However that still doesn’t solve the problem of making some shipping classes taxable and some tax-free. Setting a customer as tax exempt makes a difference to the cost of the shipping classes that are tax-free and not the others. As I said, having different settings for the method won’t work (out of the box) because the customer shouldn’t be able to choose the type of shipping – it depends on the requirements of the products.

    At the moment I’m looking at setting up two different shipping methods, one tax-free and one taxable, setting the rates for each of the shipping classes and then hiding whichever of the methods isn’t appropriate for the cart (the most expensive) using a filter on ‘woocommerce_package_rates’. It’s not straightforward!

    • This reply was modified 7 years, 2 months ago by richplane.
    Thread Starter richplane

    (@richplane)

    Hi Danny, thanks for responding.

    Are you saying I should set the product as not taxable in order to get the shipping to be tax-free? That’s not going to work because the products *are* taxable. The problem is that some customers will shop tax-free. That will affect the cost of all of the products but only some of the shipping methods.

    Have I misunderstood you?

    Thread Starter richplane

    (@richplane)

    UPDATE – I have found an ugly hack-y way of resolving Problem 3. I commented out the line in em-object.php which does the switch back from global multi-site.

    In the latest version this is line 497:

    if( !empty($tax_data['ms']) ) self::ms_global_switch_back();

    Once this is removed, all the taxonomy queries are performed on the master events tables and the events listing is filtered as I would expect.

    This will, of course, break any system not in global tables mode. There might be additional problems but I haven’t found them yet.

    Thread Starter richplane

    (@richplane)

    And I hope I won’t cause upset if I also add: Problem 3: categories and tags don’t seem to work together.

    All taxonomies are in the master events tables, but when I try to throw in a tag and one or more categories to the event search, I get no results. The same search works fine on the master site.

    When I do a $wpdb->last_query() I find that for some reason it is using the wp_5_terms_taxonomy table and not finding any valid tags in the event-tags taxonomy.

    richplane

    (@richplane)

    I am also experiencing this. As, probably, was parker in this thread.

    In our case, a major regional museum released news of significant new research prematurely, which caused some trouble.

    Our system: WP 4.4.2, Broadcast 28, 3rd party pack 28.1. The post was broadcast to one other site in the network by a user with an editor account for both sites. A few drafts were saved before the post was broadcast, and the post was ‘uncategorized’ which exists on both sites.

    The Broadcast Roles settings are set to ‘editor’ for all permissions.

    I have been unable to replicate this on our test environment, so I can’t supply a debug dump. The user trashed the post on the child blog as soon as it was spotted. I can see that the post_date is set to the time at which it was broadcast, not the publish time as per the (untrashed) parent post. But I can’t prove that the status was ‘future’ at the point that it was broadcasted, other than by knowing that the person doing it is technically competent and was on this occasion being watched by someone else!

    Possibly unconnected: when I’m logged in to the WP admin panel as an editor I see ‘Broadcast’ in the left hand menu, but when I click on it I get nothing but a PHP error:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘plainview\sdk_broadcast\wordpress\tabs\Nav_Tabs’ does not have a method ‘admin_menu_broadcast_info’ in ****\htdocs\wp-content\plugins\threewp-broadcast\src\sdk\wordpress\tabs\tabs.php on line 322

    Thread Starter richplane

    (@richplane)

    Are you using the same EM version as I am (5.5.6)? What does your EM_Bookings->delete() code look like compared the version I posted above?

    Thread Starter richplane

    (@richplane)

    I’ll try to make that more clear.

    You need to make a load of bookings for event A and one of those bookings must have an ID which is the same as the event ID for event B.

    So in my case, event A has an ID of 12 and event B has an ID of 17 (event_id in the wp_em_events table).

    The problem occurs when a booking for event A has an ID (booking_id in wp_em_bookings) of 17. This corresponds to the event ID for event B, so the line of code that I altered deletes all the bookings for this event when event A is set to have no registration.

    Thread Starter richplane

    (@richplane)

    These are normal single-occurrence events. I could reproduce it by saving event #12 with booking disabled. I backed up the database beforehand and by repeatedly restoring it I established that it was this causing the deletion.

    If you want to reproduce this error… OK:

    1. Create two events (let’s call them A and B), both with enabled registrations
    2. Make bookings for each of them such that one of the bookings for event A has an ID of the same numerical value as the event ID for B.
    3. Save event A with registration disabled
    4. When the system deletes all the registrations for event A, all the registrations for event B will also be deleted.

    Thread Starter richplane

    (@richplane)

    Postscript to this: I went ahead and changed the EM code on our site (yes, danger is my middle name) to what I think the code should be, viz:

    $result = $wpdb->query("DELETE FROM ".EM_BOOKINGS_TABLE." WHERE booking_id IN (".implode(',',$booking_ids).")");

    and saving event #12 with registration disabled now deletes only bookings for this event as expected.

    ..which backs up my suspicion of a bug in EM core code.

    I’m also experiencing this using a custom page-profile-edit template into which I’ve added <?php do_action('edit_user_avatar', $user_data); ?> to call the hook. The template is front-end but restricted to logged-in-users.

    I did the below using the same user, just changing their status:

    For Subscribers and Contributors nothing uploads. I get a standard HTML file input and an HTML submit button labelled ‘Upload’. Clicking this submits the form but the uploaded media (yes, I have enctype multipart) isn’t processed.

    For Authors, Editors and Admins I see only one input “Choose Image”. Clicking it brings up the media library. Selecting or uploading an image replaces the default gravatar image in the form, but submitting the form does nothing.

    The system has a few plugins: Advanced Custom Fields with a few extensions and Events Manager. All the others I’ve been able to try deactivating, and it didn’t affect the outcome.

    Any thoughts as to what might be causing this? It looks like we’re missing a call to wpua_action_process_option_update – it’s hooked into a few WP hooks in the code but nothing that I think my page will be calling. Is something missing from the instructions? Perhaps we need to make sure the personal_options_update hook gets called?

    So is there any other way we can make the plugin prevent people from posting until they’re been given an allowance? Will the plugin override WP Roles and Capabilities if that were to prevent them?

    We need to allow people to register, but based on what they write on registration we want to be able to allocate them a number of posts.

Viewing 15 replies - 1 through 15 (of 27 total)