Forum Replies Created

Viewing 15 replies - 16 through 30 (of 32 total)
  • Thread Starter davidkonicek

    (@davidkonicek)

    Yes, I can do all of this manually. I was wondering if there is a way to automate it. When a new multisite gets created, I want to clone some products, and add the new site title to each of those products names.

    Thread Starter davidkonicek

    (@davidkonicek)

    That’s really a separate issue I’ll work on later. I just don’t want someone who is not associated with Forever Piers to be able to check out with the product “Forever Piers Website Maintenance.” So I would basically hide my entire shop, and create a page showing only products associated with their multisite.

    I’ll try to lay out the scenario again as it developed for me – I had my parent site with several virtual products (basically invoices). One product, for example, is called “Website Development” and a user could buy that product to pay for my time developing their site. That will always be a flat fee. There is another product called “Website Maintenance” that they can purchase, get charged once a month, and I maintain their site for them. The problem arises when they have created more than one multisite, and they need to purchase “Website Development” and “Website Maintenance” for each of those multisites. The way WooCommerce is set up initially, if they purchased “Website Maintenance” twice, I wouldn’t know which multisite that is associated with. So I could resolve that by simply manually creating products every time someone registers a multisite. The products would be called “Forever Piers Website Maintenance,” “Forever Piers Website Development,” “Lighting Gallery Website Maintenance” and “Lighting Gallery Website Development.”

    Hope we’re getting closer here. Thanks again.

    Thread Starter davidkonicek

    (@davidkonicek)

    It is not network activated. It’s only on the “parent site.”

    It’s a virtual product. I have several products, but I’m using a product called “Website Maintenance” as an example. I don’t think it should matter what I’m selling to resolve this.

    Say a user creates two multisites, one called “Forever Piers” and another called “Lighting Gallery.” I’m using those two sites as development sites for those companies, which I will eventually migrate to their own domain when development is complete. So on my “parent site” I want a product called “Forever Piers Website Maintenance” and another product called “Lighting Gallery Website Maintenance”

    One way to do this would be for me to manually create a product called “Forever Piers Website Maintenance” after they have created that multisite, and I would show that product only to that user.

    Thank you very much for your reply.

    Thread Starter davidkonicek

    (@davidkonicek)

    SOLUTION

    Source URL:

    /(.*)/wp-login.php\?loggedout=true

    Target URL:

    http://www.website.com

    Notice the backslash before question mark.

    It must be frustrating for the plugin developers to have all these questions about things that don’t actually relate to their plugin, but in this case, regular expressions.

    This may not apply to you, but here’s how I have mine set up using WordPress multisite:

    Each subdomain (site) obviously has its own unique plugins active when you use multisite. So I installed the Redirection plugin on one of the sites created with multisite, and added a redirect from there.

    Source URL:

    /my

    Target URL:

    http://otherdomain.com/my

    Not sure if that helps, but at least it keeps the convo moving.

    Thread Starter davidkonicek

    (@davidkonicek)

    The following redirect does work:

    Source URL:

    /(.*)/redirect-this

    Match URL Only
    Regex enabled
    Target URL:

    http://www.website.com

    HTTP Code: 301 – Moved Permanently

    So the problem seems to be with

    ?loggedout=true

    following wp-login.php

    Thread Starter davidkonicek

    (@davidkonicek)

    Nevermind. Multisite does all this.

    Thread Starter davidkonicek

    (@davidkonicek)

    Thanks, and sorry for the confusion. It was indeed caused by a different plugin called “TimesToCome Stop Bot Registration” which isn’t even in the WordPress Repository anymore.

    davidkonicek

    (@davidkonicek)

    I’m trying out the “Update Control” plugin now. The only reason I didn’t use it before is because I couldn’t select specific plugins to update. I’m going to try it in addition to the “Automatic Plugin Updates” plugin.

    davidkonicek

    (@davidkonicek)

    When I implemented your changes to the plugin I received this error:

    Parse error: syntax error, unexpected T_FUNCTION, expecting T_PAAMAYIM_NEKUDOTAYIM in /home/examplesite/public_html/wp-content/plugins/automatic-wordpress-updates/automatic-wordpress-updates.php on line 8

    This is beyond me. I wonder if it will work with the original plugin I came up with. Or maybe this is a simple fix.

    Let me know. Thanks.

    davidkonicek

    (@davidkonicek)

    Very cool! Thanks for letting people know to update that. My expertise is not PHP.

    To anyone who uses this in their theme’s functions.php file – make sure your mods don’t get overwritten when updating the theme.

    davidkonicek

    (@davidkonicek)

    Hey guys, I resolved my issue, and hope that it helps you. I was wrong to add a filter to wp-config.php because filters are supposed to be added to a plugin. I also assumed the updates would happen immediately, but WordPress checks every 12 hours. Also, the “Updater” plugin successfully updated my plugins after an hour.

    Final Solution:
    I’m using the “Automatic Plugin Updates” plugin and I’m expecting it will work after waiting 12 hours for WordPress to check for updates.

    I also wanted to automatically update WordPress core files (major and minor, but not dev), so I created a plugin for that. Here’s how:
    1. Create a folder on your computer called “automatic-wordpress-updates”
    2. Inside that folder, create a file called “automatic-wordpress-updates.php”
    3. Add this code to the file

    <?php
    /*
    Plugin Name: Automatic WordPress Updates
    Description: Enable major and minor core updates. Disable dev updates.
    */
    add_filter( 'allow_minor_auto_core_updates', '__return_true' );
    add_filter( 'allow_major_auto_core_updates', '__return_true' );
    add_filter( 'allow_dev_auto_core_updates', '__return_false' );
    ?>

    4. Save it and upload the folder to your plugins directory.
    5. Activate the plugin, and you should be all set.

    I’m still waiting to see if all these updates will get made after 12 hours. If you see something wrong with my code, let me know.

    Thread Starter davidkonicek

    (@davidkonicek)

    To anyone else wondering about this, I’ve read that it checks every 12 hours. Not sure if this plugin works that way though.

    davidkonicek

    (@davidkonicek)

    Disregard my last comment. The filter I tried to use in wp-config.php is supposed to be used in a plugin, not wp-config. Also, I’m assuming it takes 12 hours to check for updates, so I’ll wait and see.

    davidkonicek

    (@davidkonicek)

    Automatic plugin updates are also not working for me. I added the following line to my wp-config file, just like the article said to do.

    add_filter( 'auto_update_plugin', '__return_true' );

    I don’t get a blank website like you, though. It simply has no effect for me. I would love to get auto updates working by using the WordPress core, but right now I’m trying the “Updater” plugin. It only allows the auto updates every hour at the least, so I have to wait a bit to see if it will work.

Viewing 15 replies - 16 through 30 (of 32 total)