Skip to content

Commit

Permalink
Update woocommerce-oblio.php
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaiCraciun88 committed Jan 16, 2024
1 parent 5cb8203 commit d44ae67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion woocommerce-oblio.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ function _wp_oblio_delete_invoice($order_id, $options = []) {
}

function _wp_oblio_build_url($action, $post) {
return get_site_url(null, 'wp-admin/admin-ajax.php?action=oblio_invoice&a=' . $action . '&id=' . $post->get_id());
return get_site_url(null, 'wp-admin/admin-ajax.php?action=oblio_invoice&a=' . $action . '&id=' .
(method_exists($post, 'get_id') ? $post->get_id() : $post->ID));
}

function _wp_oblio_generate_invoice($order_id, $options = array()) {
Expand Down

0 comments on commit d44ae67

Please sign in to comment.