David Jensen
Forum Replies Created
-
Forum: Plugins
In reply to: [Splide Carousel Block] Shortcode?You would use something like
serialize_blocks()
passing in array, like this for example:$shortcode_content = serialize_blocks( array(
'cloudcatch/splide-carousel',
array(
'interval' => 5000,
'breakpointTablet' => 1079,
'breakpointMobile' => 599,
'extensions' => array(
'autoScroll' => false,
'urlHash' => false
)
),
array(
array(
'cloudcatch/splide-carousel-item',
array(),
array(
array(
'core/quote',
array(),
array(
array(
'core/paragraph',
array(),
array()
),
)
),
)
),
array(
'cloudcatch/splide-carousel-item',
array(),
array(
array(
'core/quote',
array(),
array(
array(
'core/paragraph',
array(),
array()
),
)
),
)
),
array(
'cloudcatch/splide-carousel-item',
array(),
array(
array(
'core/quote',
array(),
array(
array(
'core/paragraph',
array(),
array()
),
)
),
)
),
)
) );Stick that in a shortcode using the
add_shortcode()
function.This is untested.
It would be easier to create a new shortcode, enqueing Splide via CDN or other means, and returning shortcode content that follows the proper structure splide requires.
Something like this:
function enqueue_splide_assets() {
// Enqueue Splide CSS and JS from CDN
wp_enqueue_style( 'splide-core-css', 'https://cdn.jsdelivr.net/npm/@splidejs/[email protected]/dist/css/splide.min.css', array(), '4.0.7' );
wp_enqueue_script( 'splide-js', 'https://cdn.jsdelivr.net/npm/@splidejs/[email protected]/dist/js/splide.min.js', array(), '4.0.7', true );
}
add_action( 'wp_enqueue_scripts', 'enqueue_splide_assets' );
function splide_carousel_shortcode() {
ob_start();
?>
<div id="splide-carousel" class="splide">
<div class="splide__track">
<ul class="splide__list">
<li class="splide__slide">Slide 1</li>
<li class="splide__slide">Slide 2</li>
<li class="splide__slide">Slide 3</li>
</ul>
</div>
</div>
<script>
document.addEventListener( 'DOMContentLoaded', function () {
new Splide( '#splide-carousel', {
type : 'loop',
perPage: 3,
autoplay: true,
} ).mount();
} );
</script>
<?php
return ob_get_clean();
}
add_shortcode( 'splide_carousel', 'splide_carousel_shortcode' );Forum: Plugins
In reply to: [Splide Carousel Block] Shortcode?Hello, no sorry this plugin is a block only. It could theoretically be possible but you would have to create the shortcode as this plugin does not provide one.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Changing shipping method result in -1 errorGlad to hear that, thank you
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Changing shipping method result in -1 errorIf you could please test plugin version 3.0.1 which was just released, and let me know if that solves the issue for you.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Changing shipping method result in -1 errorHello
Thank you for informing me of this issue. I was able to replicate the issue you are having, and I have found a fix. I will be releasing an update shortly which should fix this.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] PHP Fatal error in log, with psr vendorVersion 3.0.0 was just released which should fix any collisions with such dependencies.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] PHP Fatal error in log, with psr vendorHi @loaderror
Could you try this version as well?
https://www.dropbox.com/t/tB00dKhamVgzSbnh
This is the intended update which will be released soon which includes scoped dependencies so it should not interfere with other plugins that use the same dependencies, in this case Psr.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] PHP Fatal error in log, with psr vendorWould you mind trying this beta version of the plugin and let me know if you still encounter the error?
Forum: Plugins
In reply to: [WooCommerce Cart PDF] PHP Fatal error in log, with psr vendorI am still working on a fix, in the meantime I would recommend reverting to the older version of the plugin which can be downloaded from the Advanced page:
Forum: Plugins
In reply to: [WooCommerce Cart PDF] PHP Fatal error in log, with psr vendorIt looks like the WC Cart PDF plugin is having a conflict with another plugin. Are you using a Table Rate Shipping or Flexible Shipping PRO plugin?
Forum: Plugins
In reply to: [WooCommerce Cart PDF] PHP Fatal error in log, with psr vendorLooking into this now, standby
Forum: Plugins
In reply to: [WooCommerce Cart PDF] plugin updated lost translationsHi @davcaffa How did you translate the plugin, did you edit the plugin files directly?
You can keep your translations by doing this a couple ways:
- Provide Italian translations through www.ads-software.com: https://translate.www.ads-software.com/projects/wp-plugins/wc-cart-pdf/
- Translate the .pot file located in wp-content/plugins/wc-cart-pdf/languages folder using PoEdit or a similar software to generate the .po and .mo files, then upload those two files back to wp-content/languages/plugins/. They should be wc-cart-pdf-it_IT.po and wc-cart-pdf-it_IT.mo depending on the locale you are using.
Then when updating in the future your translations will be persistent.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] plugin does not work from last updateVersion 2.10.0 has been released which fixes this issue. Thank you for notifying me of this, have a good day!
Forum: Plugins
In reply to: [WooCommerce Cart PDF] plugin does not work from last updateGreat! I’ll release an official update here shortly but in the meantime feel free to use the one from Dropbox.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] plugin does not work from last updateOK let me know if that plugin I uploaded to Dropbox fixes it. This plugin has been supporting PHP 5.6 for quite some time and I think it’s time to move to PHP 8+ only. The plugin includes an updated mPDF library which is related to the error you were receiving.