Javier
Forum Replies Created
-
Forum: Plugins
In reply to: [Pay for Payment for WooCommerce] Error WooCommerce 2.6Change lines…
209 $class = new $current_section(); 210 $prefix = 'woocommerce_'.$class->id;
For
209 $prefix = 'woocommerce_'.$current_section;
erase line
$class = new $current_section();
$current_section It is not a class, is a key.
This work for my.
Best regards
Hi,
On 3.7.14 is correct.
Thanks
?Pero el error desaparece no?
Por lo que me dices ahora es cosa de configuración de pagos woocommerce.
En algún sitio al desactivar el plugin queda alguna configuración con respecto a este.
Sin entrar en el backend o ver más profundamente la web no puedo ayudar más, lo siento.
Saludos
Hola,
A voz de pronto no tiene nada que ver con el plugin WooCommerce Sermepa payment gateway, si te fijas en el error te está indicando que es en /plugins/woocommerce-khipu/, mira en plugins si tienes alguno de pagos que se llame woocommerce-khipu o algo así y desactivalo.
Edito:El problema es de este plugin -> https://www.ads-software.com/plugins/woocommerce-khipu/
Saludos.
Hi,
Sorry for not answering before. your aid works, but check script does not enter queue time for other compression plugins.
The best solution I found was:
public function setUp() { $this->setArguments( array( 'description' => __( 'My Widget.', 'my_plugin' ), ) ); if(!is_admin()){ add_action( 'wp_enqueue_scripts', enqueue_widget_scripts_frontend()); } }
so if they get queued properly.
For scripts online form works perfectly.
Thank you very much as always for your help and excellent framework.
best regards
Forum: Plugins
In reply to: [Admin Page Framework] Widgets error when configured from plugin,Hi,
It worked, and I found the reason ??
I was creating a class for the plugin and within this class called another class that handles call all internal classes. APF included.
Calling the APF class from the parent class works well.
The strange thing is that the rest of the plugin worked well so far fewer widgets.
As always, thank you very much for your time and help, hope this will help other developers who encounter the same predicament.
Forum: Plugins
In reply to: [Admin Page Framework] Widgets error when configured from plugin,<?php /** * Creates a widget. * * @since 1.0.0 */ class My_Plugin_Widget_APF extends My_Plugin_AdminPageFramework_Widget { /** * The user constructor. * * Alternatively you may use start_{instantiated class name} method. */ public function start() {} /** * Sets up arguments. * * Alternatively you may use set_up_{instantiated class name} method. */ public function setUp() { $this->setArguments( array( 'description' => __( 'Muestre un logotipo.', 'myplugin' ), ) ); } /** * Sets up the form. * * Alternatively you may use load_{instantiated class name} method. */ public function load( $oAdminWidget ) { $this->addSettingFields( array( 'field_id' => 'title', 'type' => 'text', 'title' => __( 'Título', 'myplugin' ), 'default' => 'Title', ), array( 'field_id' => 'default_image', 'type' => 'media', 'title' => __( 'Logo por defecto.', 'myplugin' ), ), array() ); } /** * Validates the submitted form data. * * Alternatively you may use validation_{instantiated class name} method. */ public function validate( $aSubmit, $aStored, $oAdminWidget ) { // Uncomment the following line to check the submitted value. // Xtend_AdminPageFramework_Debug::log( $aSubmit ); return $aSubmit; } /** * Print out the contents in the front-end. * * Alternatively you may use the content_{instantiated class name} method. */ public function content( $sContent, $aArguments, $aFormData ) { return $sContent . '<p>' . __( 'Hola mundo! Esto es un widget creado con Admin Page Framework.', 'myplugin' ) . '</p>'; //. My_Plugin_AdminPageFramework_Debug::get( $aArguments ) //. My_Plugin_AdminPageFramework_Debug::get( $aFormData ); } } new My_Plugin_Widget_APF( __( 'My Plugin : Widget APF', 'myplugin' ) // the widget title );
If active APF plugin and change My_Plugin_AdminPageFramework_Widget by AdminPageFramework_Widget works perfectly. ??
Sorry I can not give more data to help, I’m looking at the same time we are here if I help you more.
I think if you play the same stage in their web site should give you the same error.
Forum: Plugins
In reply to: [Admin Page Framework] Widgets error when configured from plugin,Hi,
Fatal error: Class ‘My_Plugin_AdminPageFramework_Widget’ not found in /volume1/web/wp-content/plugins/myplugin/widgets/mywidget.php on line 8
only tells me that the class is not found.
/**
Admin Page Framework v3.5.8 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<https://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2015, Michael Uno; Licensed under MIT <https://opensource.org/licenses/MIT>
*/
abstract class My_Plugin_AdminPageFramework_Widget extends My_Plugin_AdminPageFramework_Widget_Controller {I’ve looked at the downloaded files and files exist, at some point the class is not called correctly when APF is used in a plugin.
Forum: Plugins
In reply to: [Admin Page Framework] Widgets error when configured from plugin,Hi,
I am sure that classes are loaded, the rest of the plugin works for me perfectly.
I compiled again APF from the area of administration and downloaded again, I still have the same problem.
A doubt. When should I load the widget?. now I do it from add_action (‘widgets_init’, array ($ this, ‘my_plugin_register_widgets’)); once loaded APF.
Grateful for your help
Forum: Plugins
In reply to: [Admin Page Framework] Widgets error when configured from plugin,Hi miunosoft,
As always so attentive, thank you very much ??
It’s the first thing I’ve done, make sure that.
The rest of my plugin runs smoothly.
If I change AdminPageFramework_Widget by My_Plugin_AdminPageFramework_Widget {{and stop working
I get the message could not be found the My_Plugin_AdminPageFramework_Widget class.
Forum: Plugins
In reply to: [Admin Page Framework] Dynamically create fieldsHey, this is great ??
This opens many doors for my coding.
//My array $ArrayList = array( 'a' => 'Apple', 'b' => 'Bananas', 'c' => 'Cherry, ); //My default sorteable list foreach($ArrayList as $key => $lb){ $def[] = $key; } //Get the fields... $first = true; foreach($this->getOption('sortable_labels', $def ) as $option) { if($first) { $MyFields = array( 'label' => $ArrayList[$option], 'default' => $option, ); $first = false; } else { $MyFields[] = array( 'label' => $ArrayList[$option], 'default' => $option, ); } } //Publishing the field... $this->addSettingFields( array( 'field_id' => 'sortable_labels', 'type' => 'hidden', 'title' => __( 'Sortale Labels', 'admin-page-framework-example' ), 'sortable' => true, ) + $MyFields );
Miunosoft thank you very much for your support, I hope this helps anyone seeking to codify something.
best regards
Hey michaeluno,
This was my solution, I think it’s simple and can give you ideas for inclusion in the framework.
$labels = array( 'a' => 'Apple', 'b' => 'Banana', 'c' => 'Cherry' ); $opts = $this->getValue('sortable_labels',$labels) ; $this->addSettingFields( array( 'field_id' => 'sortable_labels', 'type' => 'hidden', 'title' => __( 'Sortale Labels', 'admin-page-framework-example' ), 'label' => $labels[$opts[0]], 'default' => 'a', 'sortable' => true, array( // second item 'label' => $labels[$opts[1]], 'default' => 'b', ), array( // third item 'label' => $labels[$opts[2]], 'default' => 'c', ), ) );
Thank you very much for your time and assistance (Y)
Hi,
Yes, it was a good solution ??
This is incorporated into framewrok?
Thank you very much for your help miunosoft (Y)
Hi,
Yes. The values ??are being kept properly in order, I mean sortable labels.
You where I indicated, Built-in Field Types-> MISC. Hidden Fields section -> Multiple.
Firs Item
Second Item
Third ItemChange the order and keep the values ??of order is saved correctly, but redisplay the field remains as
Firs Item
Second Item
Third ItemThese labels do not respect the order.
If I want, for example:
Address -> “Address” <- hiden
City -> “city” <- hiden
Country -> “Country” <- hidenAnd I order this, when viewing em back you can put for example:
Address -> “Country” <- hiden
City -> “city” <- hiden
Country -> “Address” <- hidenNot teach me:
Country -> “Country” <- hiden
City -> “city” <- hiden
Address -> “Address” <- hidenIn his examples usually always gets the same name sortable all fields. in practice I think this is not so, they should be sorted with respect to the stored field.
Best regards and thank you very much for your interest
Forum: Plugins
In reply to: [Admin Page Framework] Font selection in a comboboxhi miunosoft,
This will be translated with google is clearly a problem, haha
I mean to have a field to select types of font, size, style bold … what have other frameworks.
I think the framework is above in benefits for developer plugins from other frameworks,
Lightweight, optimized code, consumes very little server process …. But this weak in many types of fields to compose a plugin.
It is a personal opinion, I believe that this framework could with a little work on the types of fields outperform other frameworks that have become giants in size and consumption process only to give it some kind of fields like to have a selection of fonts (font type, color, size, italic ….)
I hope I have correctly expressed the idea, is not a requirement, it is an opinion and a lack of something that I think is what makes the diferiencia of this framework in respect of others.
In any way do not despair and keep trying to attach his great work on my projects, and I created a combobox with a list of sources, format, size, color, shadows.
Best regards and I repeat, great framework