Dynamic URL php function - WP All Import PRO
- or -
Post a project like this1832
£30(approx. $37)
- Posted:
- Proposals: 9
- Remote
- #2358889
- Awarded
⭐ ⭐ ⭐ ⭐ ⭐ Top Rated in Plymouth UK, 17+ Years Professional Experience, A+ Communications
Metuchen
Expertise in Laravel, AngularJS, Squarespace, Code-Igniter, Django, Shopify, PHP, JavaScript, HTML 5, CSS, Web development, Web Design, SEO
Chandigarh
Top rated PHP Web Development | WordPress | Magento | Drupal | OpenCart | PrestaShop | Joomla
Leicester
Web Development | Mobile Development | Wordpress| PHP | Woo-Commerce | Laravel
Surat
87996227426381898992119710507541247494230711526482792678326
Description
Experience Level: Entry
Hi,
I require a wordpress function that will allow for the import of dynamic files with timestamp.
This is a modification to the wordpress plugin wp all import pro.
The plugin will be used to update woocommerce stock levels automatically via ftp from remote server.
Currently the plugin allows you to 'Download from URL' - however it only allows you to specify just 1 specific file. In this case the file uploaded to the server will be structured like so:
stock-level_import_yymmdd_hhmmss.csv
The plugin needs to recognise any new file uploaded to the server and process the stock levels accordingly regardless of the timestamp.
The plugin developers have suggested the following solution to the problem:
-----------------------------------------------
You could use a custom PHP function inside of the "Download from URL" option to set a dynamic import URL. Here's an example of such a function:
function get_dynamic_import_url() {
return "http://www.mysite.com/stock-import". myfunction() .".csv";
}
(where "myfunction" is a separate function written to get the correct name for the file)
The code (once completed) can be added to your site using a plugin like Code Snippets (it won't work in our Function Editor for this use case). The function would then be used in the "Download from URL" option, like this: http://d.pr/i/MtDZI4/1xzhViIS
--------------------------------------------------------------
Kind regards,
James.
I require a wordpress function that will allow for the import of dynamic files with timestamp.
This is a modification to the wordpress plugin wp all import pro.
The plugin will be used to update woocommerce stock levels automatically via ftp from remote server.
Currently the plugin allows you to 'Download from URL' - however it only allows you to specify just 1 specific file. In this case the file uploaded to the server will be structured like so:
stock-level_import_yymmdd_hhmmss.csv
The plugin needs to recognise any new file uploaded to the server and process the stock levels accordingly regardless of the timestamp.
The plugin developers have suggested the following solution to the problem:
-----------------------------------------------
You could use a custom PHP function inside of the "Download from URL" option to set a dynamic import URL. Here's an example of such a function:
function get_dynamic_import_url() {
return "http://www.mysite.com/stock-import". myfunction() .".csv";
}
(where "myfunction" is a separate function written to get the correct name for the file)
The code (once completed) can be added to your site using a plugin like Code Snippets (it won't work in our Function Editor for this use case). The function would then be used in the "Download from URL" option, like this: http://d.pr/i/MtDZI4/1xzhViIS
--------------------------------------------------------------
Kind regards,
James.
James W.
100% (4)Projects Completed
3
Freelancers worked with
2
Projects awarded
60%
Last project
26 May 2023
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Hi James,
How regular are you planning on running this update?
Jonny -
Can i see your website link please for better bidding ? Is that your max budget ?
790831790360
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies