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 goes in the main/root plugin file | |
*/ | |
function my_plugin_url() { | |
return plugins_url( '/', __FILE__ ); | |
} |
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 | |
function api_manager_example_get_activation_info( $activation_info ) { | |
return $activation_info; | |
} | |
add_filter( 'api_manager_extra_software_status_data', 'api_manager_example_get_activation_info' ); |
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
Array | |
( | |
[status_check] => active | |
[status_extra] => Array | |
( | |
[order_key] => wc_order_52f8c4c896636_am_6wcotdeElO4l | |
[instance] => FIT0DTcFYUgd | |
[product_id] => API Manager Example | |
[activation_time] => 2014-02-13 02:40:46 | |
[activation_active] => 1 |
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 | |
function api_manager_example_get_sku( $post_id, $data ) { | |
global $wpdb; | |
$sku = $wpdb->get_var( $wpdb->prepare( " | |
SELECT meta_value FROM {$wpdb->prefix}postmeta | |
WHERE post_id = %s | |
AND meta_key = '_sku' | |
LIMIT 1 |
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
Array | |
( | |
[activated] => 1 | |
[instance] => wL3qHpt8HYJ7 | |
[activation_extra] => Array | |
( | |
[user_id] => 2 | |
[order_id] => 18 | |
[order_key] => wc_order_52f8c4c896636 | |
[license_email] => toddlahman@todds-macbook-pro.local |
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
http://localhost/toddlahman/?wc-api=am-software-api&email=toddlahman%40todds-macbook-pro.local&licence_key=wc_order_52ac24ebed6b0_am_HxntrDLPdYsM&request=status&product_id=API+Manager+Example&instance=gueGHcbrkdBQ&platform=localhost%2Ftoddlahman |
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
0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * wget -q -O - http://www.mydomainname.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 |
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
crontab -e |
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
define(‘DISABLE_WP_CRON’, true); |
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
[woocommerce_api_manager_lost_api_key] |
NewerOlder