Fadi Chamoun
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Country field dropdown at checkout pageYou can use a custom function in your theme’s
functions.php
file.add_filter( 'woocommerce_sort_countries', 'custom_woocommerce_sort_countries' );
function custom_woocommerce_sort_countries() {
return 'asc'; // asc or desc
}
Forum: Plugins
In reply to: [Extended Post Status] Fatal error with v1.0.20 when using as mu-pluginHey,
The error message you’re seeing is because the wp_get_current_user() function is not defined at the time your plugin is trying to use it. This function is defined in the pluggable.php file, which is included by WordPress after all plugins are loaded. If a plugin is loaded before pluggable.php is included, it can’t use any of the functions defined in that file.
I think the plugin developer forgot about this. But you can fix this by checking if the function wp_get_current_user() exists before calling current_user_can().
In line 758, change it to this:if ($original == 'Post published.' && function_exists('wp_get_current_user') && current_user_can('publish_posts')) {
Forum: Plugins
In reply to: [WC Variations Radio Buttons] Order variations@iworldc
I solved the problem by going to Products > Attributes > (size, color etc) Configure terms. You can drag them and order them.Forum: Plugins
In reply to: [WC Variations Radio Buttons] Ordered by NameCan you tell me how?
- This reply was modified 7 years, 12 months ago by Fadi Chamoun.
This would do the trick. Put it on your .htaccess
<IfModule security2.module> SecRuleRemoveById 114 </IfModule>
I managed to fix it, thanks for your time anyway!
All that i want is to import a json through this link “https://api.arbetsformedlingen.se/af/v0/platsannonser/matchning?lanid=6&antalrader=5”
which is requesting headers. All I want is to put headers into the file that is downloading that file. Any idea?I also saw that the uploading from URL is going through wp_ajax_upload_resource.php
Nothing with “get_file_curl.php” ?
Maybe accepting header from there while requesting download from the URL?I have a CURL code, but i dont know how to change the URL to the import URL using from the plugin import settings (wp-admin)
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.arbetsformedlingen.se/af/v0/platsannonser/matchning?lanid=6&antalrader=5", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "accept: application/json", "accept-encoding: UTF-8", "accept-language: sv", "cache-control: no-cache", "from: [email protected]", ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
Forum: Plugins
In reply to: [WP Job Manager] Restrict Number Of Categories a Listing/Job Can Use?How did you do that Mubble?
Im using Field Editor too.Forum: Plugins
In reply to: [WP Job Manager] Restrict Number Of Categories a Listing/Job Can Use?I need this one too, i need to each listing can use up to max 2 categories.
Forum: Plugins
In reply to: [WP Job Manager] Hide slug/permalinkI have tried all that and nothing works.
Forum: Fixing WordPress
In reply to: WordPress site redirect to justin bieber video on youtubeForum: Themes and Templates
In reply to: Featured image link stopped work after 3.5.1 updateI checked everything and i know whats the problem is now. Its my theme, when i use the theme Twentytwelve, it works fine.
Any special reason for this problem?
Forum: Themes and Templates
In reply to: How to change a logo?try this