plugins – Update status of Woocommerce orders using order IDs

I'm doing a custom plugin for my client, I'm not pro, the idea is to provide a user with an option to enter order IDs and change their status.

I have a little idea on how to change the order IDs in the php code. See below

$ order = new WC_Order ($ order_id);
$ order-> update_status (& # 39; pending & # 39;);

but I do not understand how to give my customer an option to enter order IDs and change the status of the order

plugins – WP2Static error – WordPress Development Stack Exchange

I've tried running the Simply Static and WP2Static plugins, but some errors have occurred.

Failed when "discovering discovered URLs", please check the Help tab to find out where to get help.

Now in the destination URL, it says that it can not be the site from which I run it .. but it's exactly there that I want the HTML site to be s & # 39; 39; executes after export.

Can this be a problem?

plugins – Website with more than 20 seconds of loading time

This is not my website, but someone asked me to check out his WordPress blog. I have never touched WordPress in my life, but I consider myself relatively computer savvy, so I thought I'd try it.

He keeps talking to me about Caching and is trying to find a magic optimization plugin on WordPress that will save the day, but I really do not think that's the problem, considering the fact that he has already several plugins for optimization and caching. I think that continually launching plugins on the problem could possibly slow things down. For the moment, he's 23. It does not seem like an absurd figure, although I think it could easily reduce it.


The first thing I did was to see if the problem was his host; I do not think it is. I found diagnostic web sites that said the host was fine, and a ping request to the site at the command prompt indicated a fairly normal response time of about 75 ms.

Then I tried to use GTMetrix and Pingdom to try to diagnose problems. I did it several times and it seemed like the initial html index file accounted for 70% of the loading time. I looked at the suggestions but none seemed to want to do much: use a CDN (my computer is in the same state as the host server), add the expiration headers (it only specified 5 files and, despite everything, really explain 20s?)

Redo tests and here are some scenarios; The results of Pingdom are now different from those described above, so take what I said with a grain of salt. Plus, I'm not sure why, but GTMetrix still has pretty good run times of a few seconds (3.7 seconds in this series) while in this series, Pingdom took 32.23 seconds.
GTMetrix

Pingdom uno

Pingdom back

So I doubt that it has provided much insight to anyone, but maybe yes. I've noticed that there are huge jumps between the same random script js and this googletagmanager thing; maybe someone could explain that?


I kept doing tests and research on google and saw that it took a long time to load the first html index file, which was weird; finally, I used the Google Performance Measurement Tool available in the Inspect Page menu and he indicated that a process (this thing: http://gc.kis.v2.scr.kaspersky-labs.com/26E3A360-F680-EE42-8566-5C7C91C35D44/main.js) took 20 seconds before allowing anything else to start charging. I saw kaspersky and I thought about security, antivirus, and so on.

Troubleshooting Google devTools

He had previously told me to put on its site antivirus and security plugins after many random connection attempts in order to be hacked. So I thought they could be the culprits. I tried to disable the 3 plugins related to security, but to no avail. I have not seen any improvement


I then went to see if there could be some plugin or if the number of plugins was the problem. Connected to his administrator account, I disabled all plugins and found a considerable improvement. After waiting 20 to 30 seconds for each load, seeing it load in about 4 seconds was like a flash. I've reloaded it several times to make sure it was not a coincidence before going through and disabling each plugin individually. I finally got to this plugin called "Tracking Code Manager" by IntellyWP. When it was activated, the loading time was unbearable: about 7 seconds without anything, followed by about 10 seconds of additional blank screen. When the plugin was deactivated, it took about 4 seconds to load the page. I've looked at the reviews of plugins and I have found no major complaints aside from the non-applicable compatibility issues. Nothing to do with slow times.


So, I went back to the guy who asked me to help him, sat in front of his computer and it was terribly slow, as before. I brought it back to my computer and it was fast enough, as I described above: ~ 4 seconds. I quickly realized that I only saw such fast times when I logged in to his administrator account. When that was not the case, it was the return to the good old days. I do not know why.


I wanted to see if it was his security plugins that were slowing down or slowing requests for unconnected sessions or something (idfk, I did not know what to do) and trying to open the site on my phone. He charged quickly, ~ 4s. I've thought, maybe it's just this IP address (we are all in the same building on the same network). I installed tunnelbear and connected from a random IP address in the US where we are, and that did not help.

I really do not know what to do. It makes no sense for me to understand why, once logged in to the admin account, it's fine, but otherwise it's unbearable to load. Now he is back to send me links on "WordPress Performance" and talk about caching plugins and optimization! As I said, he already has several, so I really do not think this is the problem, and no matter, he does not have a lot of resources on his site. This should not be the cause of loading time of 20-30 seconds.

Yes no matter who has had similar problems or has ideas, ideas or solutions, help me please. Sorry to spit information from a car manual, but if you're reading this, thanks!


TL; DR
Help look into a guy wordpress site, taking 20-30s to load. I do not think that caching or optimizing plugins is the question, as this would not explain 20s of downtime. I've removed each of its plugins until I find one called "Tracking Code Manager" which, when removed, speeds up the load times immensely, but only when you're logged in to the admin account. Otherwise, it made no difference. I do not know why. There is a lot more information that could give insight. Please help me, thank you!

plugins – How to display pagination of articles grouped by category?

I have a blog page where I list all categories as tabs. By clicking on a tab (category), I pull the API call example http: // my_domian / abc / wp-json / wp / v2 / posts? categories = 35 where 35 is the category Id. However, this always gets the last 10 messages and there is no paging to navigate to the next messages.

How can I implement paging in this? Am I missing something in the settings?

P.S: I have defined a static page as the home page and I have NOT defined the publications page for the site.

plugins – Statiscal wordpress site using imported Excel tables

Hello and thank you to all who can share help.

I create a website containing many static table data from a game that I update daily.

I import the data and convert it into Excel tables, then I have to import Excel tables from the wordpress site. And here is my problem.
I want to import about 50,000 tables and once I have finished the html and css updates, just update them by simply importing the new Excel tables. I have reviewed WpDatatables and Tablepress but I am not convinced that they can handle the number of tables.
I've also looked at paid plugins like ipushpull and caspio, which seem a little exaggerated.
I am also open to the ideas that they will excel and directly convert the data.
Any help would be greatly appreciated.

magento2 – Magento plug-ins (interceptors) can be used to delete before and after the plug-in?

Why not wrap everything in the interior around plugin for your case? So that:

public function around Function ( My  Module  Model  MyUtility $ subject, callable $ proceed) {
// if the condition is true
so true){
// BeforeFunction
// make some sound
// ExecuteFunction
$ continue ();
}
}

plugins – Photos will not be uploaded to WP during a Wi-Fi connection and will work properly on another

I have created a photo gallery for a friend. I can upload photos to his photo gallery from home with the help of my WiFI, while he can not at home. I brought her laptop back home and I can download her computer to my home very well.

Is there some sort of WiFI setting that he could have at home to prevent photos from downloading properly? There is no real error message. The photo seems to download 99% of the way and then fails to download without returning specific error message. The photos that he tries to download from his home do not appear at all in his gallery of images. I did try it with his iPhone and I had the same kind of thing when trying to upload a photo to his WP site.

It is worth mentioning that he can upload photos to Instagram, which avoids the general problems of uploading photos.

So I took his laptop home and I can upload photos to his photo gallery without any problem. The only difference I can see between the two places is the WiFI and the internet connection. Recommendations on how to solve and solve this problem? Thank you!

plugins – Woocommerce functions in a custom class, avoid errors

How to call Woocommerce functions in a custom class?

I have the following class method that is called on a cronjob action

here how to save my cron action

register_activation_hook (__ FILE__, array ('Ratings  Admin  MailJobs', & # 39; activateMailJobs & # 39;));

and here is the hole class

Namespace  Admin;

use Ratings  Email  CronMails as mail;

/ **
* MailJobs class
* @package Ratings  Admin
* /
MailJobs class
{

private options $;


/ **
* MailJobs constructor.
* /
public service __construct ()
{
if (in_array ('woocommerce / woocommerce.php'), apply_filters ('active_plugins', get_option (& # 39; active_plugins & # 39;))))) {
add_action (& # 39; ausg_daily_event & # 39;) array ($ this, & quot; dailyAusgMails & # 39;));
$ this-> dailyAusgMails ();
}
}

public function init ()
{
if (in_array ('woocommerce / woocommerce.php'), apply_filters ('active_plugins', get_option (& # 39; active_plugins & # 39;))))) {
add_action (& # 39; ausg_daily_event & # 39;) array ($ this, & quot; dailyAusgMails & # 39;));
}
}

/ **
* Enable Mail CronJobs
* /
public function activateMailJobs ()
{
if (! wp_next_scheduled (& # 39; ausg_daily_event & # 39;)) {
wp_schedule_event (strtotime (23: 59: 00), "daily", "ausg_daily_event");
}
}

/ **
* disable Mail CronJobs
* /
protected function deactivateMailJobs ()
{
wp_clear_scheduled_hook (& # 39; ausg_daily_event & # 39;);
}

/ **
* send emails on CronJob
* /
protected function dailyAusgMails ()
{
add_action (& # 39; woocommerce_after_register_post_type & # 39 ;, array ($ this, & # 39; getPaidOrders & # 39;));
}

/ **
* @return  stdClass |  WC_Order[]
     * /
public function getPaidOrders ()
{

/ **
* $ orders = $ this-> getPaidOrders ();
var_dump ($ orders);
die;
if ($ orders) {
foreach ($ orders as $ orders) {
Mailer :: send ();
}
}
* /


$ targetDate = strtotime (& # 39; - 3 days & # 39;);
$ targetDateObject = date (Y-m-d, $ targetDate);

$ args = array (
& # 39; limit & # 39; => -1,
& # 39; status & # 39; => array (& # 39; wc-complete & # 39;),
& # 39; like & # 39; => array (& # 39; shop_order & # 39;),
// date_paid & # 39; => $ targetDateObject. & # 39; ... & # 39; $ targetDateObject
)

$ orders = wc_get_orders ($ args);

// var_dump (count ($ orders));
// wp_die ();
return the orders $;
}
}

who fails with the following error Fatal Error: Error Not Recovered: Calling Undefined Function Ratings Admin wc_get_orders (

plugins – Addition of a custom field in the wp job manager but can not display the search page [jobs] Job Offers

I'm trying to add a custom field to the wp job manager. I've mentioned the code I've used, as well as screenshots attached, enter the description of the image here enter the description of the image here enter the description of the image here
it does not show the results for "the final year student can also apply"
but showing cooler results can also apply
enter the description of the image here enter the description of the image here
can anyone check the code I've used? I think that there is an error in my code (3)
Added using code snippets

** 1) Code I've used for adding to the job submission form **
// Add a custom field of additional information

add_filter (& # 39; submit_job_form_fields & # 39; frontend_add_Additional_information_field & # 39;);

function frontend_add_Additional_information_field ($ fields) {
$ fields[‘job’][‘job_Additional_information’] = table (
& # 39; Label & # 39; => __ (& # 39; Additional Information & # 39 ;, & # 39; job_manager & # 39;),
& # 39; like & # 39; => & # 39 ;, select
& # 39; Options & # 39; => array ('Select additional information', 'Last year students can also apply can also apply' => 'Last year students can also apply, "Freshers can also apply" => Freshers can also apply as well,
& # 39; required & # 39; => false,
& # 39; placeholder & # 39; => & # 39;
& # 39; priority & # 39; => 9
)
returns $ fields;
}
2) code that I had used to display on a single list
add_action (& # 39; single_job_listing_meta_end & # 39 ;, & quot; display_job_Additional_information_data & # 39;);
function display_job_Additional_information_data () {
global $ post;

$ Additional_information = get_post_meta ($ post-> ID, _job_Additional_information, true);

if ($ Additional_information) {
echo & # 39;

  • & # 39 ;. __ (& # 39; Additional information: & # 39;). & # 39; & # 39; . esc_html ($ Additional_information). & # 39;
  • & # 39 ;;
    }
    }
    3) the code that I showed in the search [jobs] page
    add_action (& # 39; job_manager_job_filters_search_jobs_end & # 39;; & # 39; filter_by_Additional_information_field & # 39;);
    function filter_by_Additional_information_field () {
    ?>

        
    
    <? php

    }
    add_filter (& # 39; job_manager_get_listings & # 39 ;, & quot; filter_by_Additional_information_field_query_args & # 39 ;, 10, 2);
    function filter_by_Additional_information_field_query_args ($ query_args, $ args) {
    if (isset ($ _POST[‘form_data’] )) {
    parse_str ($ _POST[‘form_data’], $ form_data);
    if (! empty ($ form_data[‘filter_by_Additional_information’] )) {
    $ selected_range = sanitize_text_field ($ form_data[‘filter_by_Additional_information’] )
    switch ($ selected_range) {
    case "Last year students can also apply":
    $ query_args[‘meta_query’][] = table (
    & # 39; key & # 39; => & # 39; _job_Additional_information & # 39;
    & # 39; value & # 39; => "Last year students can also apply",
    & # 39; like & # 39; => & # 39; TEXT & # 39;
    )
    Cases 'Freshers can also apply':
    $ query_args[‘meta_query’][] = table (
    & # 39; key & # 39; => & # 39; _job_Additional_information & # 39;
    & # 39; value & # 39; => & # 39; Freshers can also apply & # 39 ;,
    & # 39; like & # 39; => & # 39; TEXT & # 39;
    )
    }
    add_filter ('job_manager_get_listings_custom_filter & # 39; __' return_true & # 39;);
    }
    }
    return $ query_args;
    }