This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Allow Autonami admin APP to run for 'WooCommerce Store manager' user role. | |
*/ | |
add_filter( 'bwfan_crm_api_access_caps', function ( $caps ) { | |
$caps[] = 'manage_woocommerce'; | |
return $caps; | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This function fires a curl request with get or post method | |
* $method contains 'get' or 'post' | |
* $query_string contains $query_string = "?x=10&y=20"; | |
*/ | |
curl_download($Url, $query_string, $method); | |
function curl_download($Url, $query_string, $method) { | |
if ($method == 'get') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |