Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('init', function () {
- if (get_option('w2dc_payments_addon')) {
- if (get_user_by('login', 'juslintek')->ID == get_current_user_id()) {
- global $wpdb;
- $query = $wpdb->prepare(
- "SELECT p.ID FROM %s p JOIN %s pp ON pp.post_type = %s AND pp.ID=p.post_parent WHERE p.post_type = %s",
- $wpdb->posts,
- $wpdb->posts,
- W2DC_POST_TYPE,
- W2DC_INVOICE_TYPE
- );
- pretty_var_dump($query, 'plain');
- $invoices = $wpdb->get_results($query, ARRAY_A);
- //getInvoiceByID();
- pretty_var_dump($invoices,'exit');
- }
- //getInvoiceByID();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment