AndyMacKay
Forum Replies Created
-
Forum: Reviews
In reply to: [ReOrder Posts within Categories] Well done!Apologies for taking so long to get back to you. The internet on my island has been down the last couple of days so this is the only chance i had.
Anyway, I made a fork of the plugin https://github.com/BinaryGeometry/custom-post-type-ui/commit/94c86b91c9702ff9203fa0e3703ce10359120214
So you can either download the new custom-post-type-ui.php file, or else look at the commit message to see what changes you need to make to the plugin you have installed already.
Basically all we are doing is adding a single key pair onto the end of the arguments array for the native WordPress create_custom_post_types() function.
I can’t actually test it as I don’t have WordPress installed, but let me know how you get on if you would as I would like to push the changes back into the original repository if you find that this solves the compatibility issue you where having.
– ‘labels’ => $cpt_labels
+ ‘labels’ => $cpt_labels,
+ ‘show_in_nav_menus’ => trueForum: Reviews
In reply to: [ReOrder Posts within Categories] Well done!Hi Trish,
I didn’t actually use the Custom Post Type UI, but created the custom post types within my functions.php file.
My guess is that you are seeing the options above in wordpress admin, rather than within the plugin code?
I might still be able to help, but is the above assumption correct before I continue?
Andy
Hi Sean,
I’ve never seen that syntax before, so just thought it was error. With the version of PHP I am using, it simple rendered into the html as a string data=”<?= this should have been the value” and hence the javascript did not work.
Cheers
Andy
So I can see
$this->publishable_key
should be returning a value from thewoocommerce_Striper_settings
table dependant on whether it is test mode or not.Managed to tweak line 10 of payment.php to read, this seems to have fixed my issue.
<?php echo $this->publishable_key; ?>
Thanks for your hard work in building this plugin.
Hi Sean,
I dug into the code a little. My rendered checkout page looks like this
<div id=”stripe_pub_key” class=”hidden” style=”display:none” data-publishablekey=”<?=$this->publishable_key ?>”> </div>
Which would explain why the Stripe.setPublishableKey function is getting an invalid value.
Don’t know if it’s something weird with my page or with this build of the plugin but will let you know if I get any further.
Thanks for your quick response
Hi dm10014,
This was a long time ago, but as I was having this problem and managed to resolve it by looking in the reorder-posts-within-categories.php plugin file, I will show my debug procedure which may be useful.
I searched in the language file for ‘Sort items such as “Offering”‘ which was the html output in my admin for the settings page of the plugin that displays the available categories, this gave me the French used in the php code ‘Types d’articles disponibles’.
Now I knew that I was in the correct part of the file I could read line 685
$post_types = get_post_types( array( 'show_in_nav_menus' => true,'public'=>true, 'show_ui'=>true, 'hierarchical' => false ), 'object' );
and from here I could see the settings I needed to use in the register_post_type aguements array. I could also read a few lines down at 699
if($taxonomie->hierarchical == 1
So I knew that I should also set my taxonomy post type to be true within the register_taxonomy $args array.And big thumbs up to the plugin developer, I searched high and low on the internet for this functionality. You made my day!