I created a custom transaction logs page fetching my data directly from WooCommerce database. I am trying to do a requery and i need the mac key and product id to create my hash which i can’t find in the database.
I am new to the payment gateways especially with WordPress.
Can anyone tell me where i can get the mac_key and product_id either from an existing library or straight from the database.
I tried this but not working.
<?php global $woocommerce; // Load the form fields. $this->init_form_fields(); // Load the settings. $this->init_settings(); // Define user set variables $this->product_id = $this->get_option( 'product_id' ); $this->pay_item_id = $this->get_option( 'pay_item_id' ); $this->mac_key = $this->get_option( 'mac_key' ); echo $this->mac_key; die; ?>
Read more here: Making use of global woocomerec on a custom page