Shortcode returning localized HTML part

Using your comments, I found what I was missing. I initialized my textdomain with : add_action(‘admin_init’, ‘related_post_shortcode_init’); function related_post_shortcode_init() { load_plugin_textdomain(‘related-post-shortcode’, false, basename( dirname( __FILE__ ) ) . ‘/i18n’ ); } So, the textdomain was ok and ready for back-office translations (admin_init), but not for front, as @Mark Kaplun suggested. I simply added another hook … Read more

Access Child Class of Plugin Main Class Instance

If you want to get a hold of the WC_Freshdesk instance without re-instantiating it then call: $integrations = WC()->integrations->get_integrations(); remove_action(‘woocommerce_view_order’, array($inegrations[‘wc-freshdesk’], view_order_create_ticket’), 40 ); Note: I’m just guessing the key of wc-freskdesk, inspect the array otherwise The call to WC()->integrations->get_integrations() returns all the integrations that were instantiated early in the woocommerce init process, you can … Read more

You do not have sufficient permissions to access this page on a submenu

Continued to do more research and ended up finding the solution to my problem! Since the url I am passing the parameter to is /wp-admin/admin.php?page=ecosystem-delete. I didn’t even notice that ?page=ecosystem-delete is already a parameter, so I needed to pass my second parameter into the URL as &id= rather than ?id=. A simple overlooked mistake. … Read more

How to Get WordPress custom post data in WooCommerce product meta panel? [closed]

My answer use 3 steps too : Step 1 : adding a new tab on the list add_filter(“woocommerce_product_data_tabs”, function ($product_data_tabs) { $product_data_tabs[“newTabId”] = [ “label” => “Hello 1”, “target” => “htmlIdOfTheBox”, “class” => [], ]; return $product_data_tabs; }); Step 2 : preparing the html box for this new tab add_action(“woocommerce_product_data_panels”, function () { ?> <div … Read more