enollo / woocommerce-google-trusted-stores-integration

Provides integration between Google Trusted Stores and WooCommerce.
12 stars 18 forks source link

google_base_subaccount_id - Google Shopping Option does not stay checked // code also not found in source #4

Open s-a-s-k-i-a opened 9 years ago

s-a-s-k-i-a commented 9 years ago

When checking the Google Shopping option in the admin backend, then pressing save changes, the option won't stay checked.

Also the entered values are not visible in the source when visiting a product page f.e. I checked via google trusted stores test tool and it returns an error telling me that the (optional) google_base_subaccount_id can't be found.

tamarazuk commented 9 years ago

hey @s-a-s-k-i-a, I can't seem to replicate this. Are you testing this with the master branch?

The google_base_subaccount_id is added to the footer here

s-a-s-k-i-a commented 9 years ago

Hi Tamara,

yes I just downloaded the master again. I changed the load textdomain part a slight bit, because I didn't feel like creating a new po-mo file pair again for the text domain you used.


the code differs like this:

you used:

to implement I used: // Add internationalization i18n load_plugin_textdomain( 'wc_google_trusted_stores', false, dirname( plugin_basename( FILE ) ) . '/i18n/languages' );

add_action( 'plugins_loaded', 'load_plugin_textdomain' );

you used: function wc_google_trusted_stores_load_translation() { load_plugin_textdomain( 'wc_google_trusted_stores', false, dirname( plugin_basename( FILE ) ) . '/i18n/languages' ); }

add_action( 'init', 'wc_google_trusted_stores_load_translation' );


And of course within the includes file I changed the text domain as well whereever it was used.

Everything else is the same. To get the shopping subacccount id to show up, I had to modify the code so it would not do an "if"-request for the google shoppping checkbox being checked in admin here in line 191ff: // }

    // if ( $this->gts_google_shopping_account_enable === 'yes' && $this->gts_google_shopping_account_id !== '' ) {

Now the google test is successfull.

Weird.. I didn't get this error before. But I do not know what it was that I changed so the backend of your plugin would not work as intented anymore. I updated the theme lately; I installed the latest woocommerce verison and I believe there was WordPress update; I also installed W3 Caching plugin. Maybe this plugin keeps your plugin from saving the checked checkbox?

Greets Saskia

Am 01.02.2015 um 21:50 schrieb Tamara Zuk notifications@github.com:

hey @s-a-s-k-i-a https://github.com/s-a-s-k-i-a, I can't seem to replicate this. Are you testing this with the master branch?

The google_base_subaccount_id is added to the footer here https://github.com/enollo/woocommerce-google-trusted-stores-integration/blob/master/includes/class-wc-google-trusted-stores-integration.php#L196 — Reply to this email directly or view it on GitHub https://github.com/enollo/woocommerce-google-trusted-stores-integration/issues/4#issuecomment-72383514.