WC Backend -> Extension Configuration not displayed
-
Hi Community
I’m creating an Payment-Extension for WooCommerce.
Now I have a problem (again).For my extension, the configuration-page in the wc backend is empty. Only the blue Save button is displayed. But the payment-class is working in the frontend (So i can use the payment-method, just as it should be).
I tried everything like I found it here: https://docs.woocommerce.com/document/payment-gateway-api/
I created the method init_form_fields (called in the constructor):
public function init_form_fields() { $this->form_fields = array( 'enabled' => array( 'title' => __( 'Enable/Disable', 'woocommerce' ), 'type' => 'checkbox', 'label' => __( 'Enable xXXX.', 'a_xxx' ), 'default' => 'yes' ), 'title' => array( 'title' => __( 'Title', 'woocommerce' ), 'type' => 'text', 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ), 'default' => $this->method_title, 'desc_tip' => true, 'placeholder' => $this->method_title ), 'description' => array( 'title' => __( 'Customer Message', 'woocommerce' ), 'type' => 'textarea', 'default' => $this->method_description, 'placeholder' => $this->method_description ) ); }
And I created this method (but I also tried completly without it, cause it’s defined in the abstract):
public function admin_options() { ?> <h2><?php _e('xxxx','a_xxx'); ?></h2> <table class="form-table"> <?php $this->generate_settings_html(); ?> </table> <p> <?php _e( 'You find more Options in Settings > XXX.', 'a_xxx' ); ?> </p> <?php }
I also tried to just use the init_form_fields method from the URL I wrote before, but the configuration page is always empty. Because the other (default) payment-methodes are working, so I also tried to copy the init_form_fields and admin_options methods from them, but it’s still the same.
So what’s the point with this stuff? how is that working? What I forgot to think on? Help?
- The topic ‘WC Backend -> Extension Configuration not displayed’ is closed to new replies.